From f2fbd6177a68b7d96a49c16e6859cec63f28962e Mon Sep 17 00:00:00 2001 From: genofire Date: Fri, 8 Oct 2021 13:53:08 +0200 Subject: [PATCH] sway: keys for sound/light + ... --- home.nix | 1 + sway.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/home.nix b/home.nix index 03b5b40..b1a48e3 100644 --- a/home.nix +++ b/home.nix @@ -33,6 +33,7 @@ go gcc libcap go-langserver pass + glow ]; programs.zsh = { diff --git a/sway.nix b/sway.nix index f5a2f60..0d5efa6 100644 --- a/sway.nix +++ b/sway.nix @@ -209,6 +209,24 @@ "${modifier}+Shift+9" = "move container to workspace number ${ws9}"; "${modifier}+Shift+0" = "move container to workspace number ${ws10}"; + "XF86AudioLowerVolume" = "exec ponymix -N decrease 5"; + "${modifier}+XF86AudioLowerVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') decrease 5"''; + "XF86AudioRaiseVolume" = "exec ponymix -N increase 5"; + "${modifier}+XF86AudioRaiseVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') increase 5"''; + + "XF86AudioMute" = "exec ponymix -N toggle"; + + "${modifier}+XF86AudioMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"''; + "XF86AudioMicMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"''; + + "XF86MonBrightnessUp" = ''exec "sh ~/.local/bin/key_light.sh up"''; + "XF86MonBrightnessDown" = ''exec "sh ~/.local/bin/key_light.sh down"''; + "XF86Display" = ''exec "swaymsg output eDP-1 toggle"''; + + "${modifier}+p" = "exec passmenu"; + + "${modifier}+F11" = ''exec "swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch"''; + "Print" = ''exec "grim -g \"$(slurp)\""''; }; assigns = { "${ws1}" = [