Sway/Waybar additions

This commit is contained in:
Andrea Ciceri 2021-10-21 12:18:10 +02:00
parent 43b2f39c35
commit ce1484753d
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
2 changed files with 48 additions and 76 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, lib, ... }:
{ {
home.packages = with pkgs; [ wl-clipboard ]; home.packages = with pkgs; [ wl-clipboard ];
wayland = { wayland = {
@ -14,7 +14,7 @@
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'"; menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
output = { output = {
HDMI-A-2 = { HDMI-A-2 = {
#bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill"; bg = "${./wallpaper.jpg} fill";
}; };
}; };
#fonts = [ "Font Awesome" "Fira Code" ]; #fonts = [ "Font Awesome" "Fira Code" ];
@ -25,37 +25,15 @@
} }
]; ];
startup = let startup = [
gsettings = "${pkgs.glib}/bin/gsettings";
gsettingsscript = pkgs.writeShellScript "gsettings-auto.sh" ''
expression=""
for pair in "$@"; do
IFS=:; set -- $pair
expressions="$expressions -e 's:^$2=(.*)$:${gsettings} set org.gnome.desktop.interface $1 \1:e'"
done
IFS=
echo "" >/tmp/gsettings.log
echo exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
eval exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
'';
gsettingscmd = ''${gsettingsscript} \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
font-name:gtk-font-name \
cursor-theme:gtk-cursor-theme-name'';
in
[
{ {
command = "foot --server"; command = "foot --server";
always = true; always = true;
} }
#{ always = true; command = "${gsettingscmd}"; }
]; ];
window.commands = [ floating.criteria = [
{ criteria = { app_id = "mpv"; }; command = "sticky enable"; } { title = "MetaMask Notification.*"; }
{ criteria = { app_id = "mpv"; }; command = "floating enable"; } { title = "Volume Control"; } # pavucontrol
{ criteria = { title = "MetaMask Notification.*"; }; command = "floating enable"; }
]; ];
input = { input = {
"*" = { "*" = {
@ -63,9 +41,9 @@
xkb_variant = "intl"; xkb_variant = "intl";
}; };
}; };
keybindings = { keybindings = lib.mkOptionDefault {
"${modifier}+f" = "exec firefox"; "${modifier}+x" = "exec ${pkgs.customEmacs}/bin/emacs";
"${modifier}+e" = "exec emacs"; "${modifier}+b" = "exec ${pkgs.firefox}/bin/firefox";
}; };
}; };
extraConfig = '' extraConfig = ''
@ -84,13 +62,13 @@
{ {
layer = "top"; layer = "top";
position = "top"; position = "top";
#output = [ "HDMI-A-2" ]; height = 30;
modules-left = [ modules-left = [
"sway/mode" "sway/mode"
"sway/workspaces" "sway/workspaces"
]; ];
modules-center = []; modules-center = [ "sway/window" ];
modules-right = [ modules-right = [
"idle_inhibitor" "idle_inhibitor"
"tray" "tray"
@ -111,13 +89,7 @@
"sway/mode" = { tooltip = false; }; "sway/mode" = { tooltip = false; };
idle_inhibitor = { "sway/window" = { max_length = 50; };
format = "{icon}";
format-icons = {
activated = "unlocked";
deactivated = "locking";
};
};
pulseaudio = { pulseaudio = {
format = "vol {volume}%"; format = "vol {volume}%";

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB