aboutsummaryrefslogtreecommitdiff
path: root/services/sxhkd.nix
blob: debe1b55adb656e677c5c809040520ead5ff0c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config
, pkgs
, theme
, ...
}:

let
  jumpTo = app: "${pkgs.xdotool}/bin/xdotool search \"${app}\" windowactivate";
in
{
  services.sxhkd = {
    enable = true;
    keybindings = {
      "XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}";
      "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle";
      "XF86MonBrightness{Down,Up}" = "${pkgs.light}/bin/light -{U,A} 5";

      # jump to firefox
      "super + alt + shift + ctrl + f" = jumpTo "Mozilla Firefox";

      # jump to st
      "super + alt + shift + ctrl + s" = jumpTo "st";

      # jump to zathura
      "super + alt + shift + ctrl + z" = jumpTo "zathura";
    };
  };
}