nixos/home/modules/playerctl.nix
Zynh Ludwig 344f34c061 feat: playerctl module
enable playerctl

playerctl package

adding sxhkd

enabling xsession

media keybinds
2024-07-11 04:13:33 -07:00

28 lines
546 B
Nix

{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.playerctl;
in
{
options.snowhawk.playerctl = {
enable = lib.mkEnableOption "playerctl";
};
config = lib.mkIf cfg.enable {
services.playerctld.enable = true;
xsession.enable = true;
home.packages = with pkgs; [
playerctl
];
services.sxhkd = {
enable = true;
keybindings = {
"XF86AudioPlay" = "playerctl play-pause";
"XF86AudioPrev" = "playerctl previous";
"XF86AudioNext" = "playerctl next";
};
};
};
}