diff options
Diffstat (limited to 'services/sxhkd.nix')
-rw-r--r-- | services/sxhkd.nix | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/services/sxhkd.nix b/services/sxhkd.nix index d8678af..fab1316 100644 --- a/services/sxhkd.nix +++ b/services/sxhkd.nix | |||
@@ -10,8 +10,8 @@ let | |||
10 | ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}" | 10 | ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}" |
11 | ''; | 11 | ''; |
12 | volume = pkgs.writeScriptBin "volume" '' | 12 | volume = pkgs.writeScriptBin "volume" '' |
13 | ${pkgs.alsaUtils}/bin/amixer $@ | 13 | ${pkgs.alsa-utils}/bin/amixer $@ |
14 | v=$(${pkgs.alsaUtils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}') | 14 | v=$(${pkgs.alsa-utils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}') |
15 | ${progress "volume" "$v"} | 15 | ${progress "volume" "$v"} |
16 | ''; | 16 | ''; |
17 | 17 | ||
@@ -19,14 +19,21 @@ in | |||
19 | { | 19 | { |
20 | services.sxhkd = { | 20 | services.sxhkd = { |
21 | enable = true; | 21 | enable = true; |
22 | keybindings = { | 22 | keybindings = |
23 | "super + slash" = "${pkgs.light}/bin/light -A 2"; | 23 | let |
24 | "super + shift + slash" = "${pkgs.light}/bin/light -U 2"; | 24 | vol_up = "${volume}/bin/volume sset Master 2%+"; |
25 | "super + semicolon" = "${volume}/bin/volume sset Master 2%+"; | 25 | vol_down = "${volume}/bin/volume sset Master 2%-"; |
26 | "super + shift + semicolon" = "${volume}/bin/volume sset Master 2%-"; | 26 | in |
27 | "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close"; | 27 | { |
28 | "super + shift + space" = "${pkgs.dunst}/bin/dunstctl history-pop"; | 28 | "super + slash" = "${pkgs.light}/bin/light -A 2"; |
29 | "super + ctrl + shift + space" = "${pkgs.dunst}/bin/dunstctl close-all"; | 29 | "super + shift + slash" = "${pkgs.light}/bin/light -U 2"; |
30 | }; | 30 | "super + semicolon" = vol_up; |
31 | "super + shift + semicolon" = vol_down; | ||
32 | "XF86AudioRaiseVolume" = vol_up; | ||
33 | "XF86AudioLowerVolume" = vol_down; | ||
34 | "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close"; | ||
35 | "super + shift + space" = "${pkgs.dunst}/bin/dunstctl history-pop"; | ||
36 | "super + ctrl + shift + space" = "${pkgs.dunst}/bin/dunstctl close-all"; | ||
37 | }; | ||
31 | }; | 38 | }; |
32 | } | 39 | } |