{ config , pkgs , theme , ... }: let progress = text: value: '' ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}" ''; volume = pkgs.writeScriptBin "volume" '' ${pkgs.alsaUtils}/bin/amixer $@ v=$(${pkgs.alsaUtils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}') ${progress "volume" "$v"} ''; in { services.sxhkd = { enable = true; keybindings = let vol_up = "${volume}/bin/volume sset Master 2%+"; vol_down = "${volume}/bin/volume sset Master 2%-"; in { "super + slash" = "${pkgs.light}/bin/light -A 2"; "super + shift + slash" = "${pkgs.light}/bin/light -U 2"; "super + semicolon" = vol_up; "super + shift + semicolon" = vol_down; "XF86AudioRaiseVolume" = vol_up; "XF86AudioLowerVolume" = vol_down; "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close"; "super + shift + space" = "${pkgs.dunst}/bin/dunstctl history-pop"; "super + ctrl + shift + space" = "${pkgs.dunst}/bin/dunstctl close-all"; }; }; }