dwm: unclutter-xfixes option

main
Zynh Ludwig 2024-11-06 19:14:42 -08:00
parent 2500589ae9
commit b4fe279925
1 changed files with 16 additions and 2 deletions

View File

@ -7,13 +7,27 @@ in
{
options.snowhawk.dwm = {
enable = mkEnableOption "niri home-manager module";
useXFixes = mkEnableOption "using unclutter-xfixes instead of unclutter";
};
config = mkIf cfg.enable {
# WM Stuff
xsession.numlock.enable = true;
services.unclutter.enable = true;
services.unclutter.package = pkgs.unclutter-xfixes;
services.unclutter = {
enable = true;
package = if cfg.useXFixes then pkgs.unclutter-xfixes else pkgs.unclutter;
};
systemd.user.services.unclutter.Service.ExecStart =
let cfg = config.services.unclutter;
in lib.mkForce ''
${cfg.package}/bin/unclutter \
--timeout ${toString cfg.timeout} \
--jitter ${toString (cfg.threshold - 1)} \
${lib.concatStrings cfg.extraOptions}
'';
};
}