diff --git a/home/modules/playerctl.nix b/home/modules/playerctl.nix index c35baf5..50dbdb7 100644 --- a/home/modules/playerctl.nix +++ b/home/modules/playerctl.nix @@ -15,11 +15,27 @@ in playerctl ]; + + systemd.user.services.sxhkd = { + Unit = { + Description = "sxhkd service"; + PartOf = [ "graphical-session.target" ]; + }; + Service = { + Type = "exec"; + ExecStart = "${pkgs.sxhkd}/bin/sxhkd"; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + services.sxhkd = { + enable = true; keybindings = { - "XF86AudioPlay" = "playerctl play-pause"; - "XF86AudioPrev" = "playerctl previous"; - "XF86AudioNext" = "playerctl next"; + "XF86AudioPlay" = "${pkgs.playerctl}/bin/playerctl play-pause"; + "XF86AudioPrev" = "${pkgs.playerctl}/bin/playerctl previous"; + "XF86AudioNext" = "${pkgs.playerctl}/bin/playerctl next"; }; }; };