summary refs log tree commit diff stats
path: root/user/settings/sxhkd.nix
blob: 75ce0798c09e7cba097b7148cb858aac7fcbc214 (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
29
30
31
32
33
34
{ config
, pkgs
, ...
}:
let
  pamixer = "${pkgs.pamixer}/bin/pamixer";
  light = "${pkgs.light}/bin/light";
  playerctl = "${pkgs.playerctl}/bin/playerctl";
  networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
in
{
  xdg.configFile."sxhkd/sxhkdrc".text = ''
    XF86AudioMute
      ${pamixer} --toggle-mute

    XF86Audio{Lower,Raise}Volume
      ${pamixer} --{decrease,increase} 1

    @XF86AudioMicMute
      ${pamixer} --source 2 --toggle-mute

    XF86MonBrightness{Down,Up}
      ${light} -{U,A} 2%

    XF86AudioPlay
      ${playerctl} play-pause

    XF86Audio{Prev,Next}
      ${playerctl} {previous,next}

    XF86Tools
      ${networkmanager_dmenu}
  '';
}