diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/default.nix | 2 | ||||
-rw-r--r-- | services/sxhkd.nix | 29 |
2 files changed, 19 insertions, 12 deletions
diff --git a/services/default.nix b/services/default.nix index bef7c85..a45f53a 100644 --- a/services/default.nix +++ b/services/default.nix | |||
@@ -1,6 +1,7 @@ | |||
1 | { config | 1 | { config |
2 | , pkgs | 2 | , pkgs |
3 | , theme | 3 | , theme |
4 | , font | ||
4 | , ... | 5 | , ... |
5 | }: | 6 | }: |
6 | 7 | ||
@@ -24,5 +25,4 @@ | |||
24 | pinentryPackage = pkgs.pinentry-tty; | 25 | pinentryPackage = pkgs.pinentry-tty; |
25 | }; | 26 | }; |
26 | }; | 27 | }; |
27 | |||
28 | } | 28 | } |
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 | } |