Compare commits
2 commits
b4fe279925
...
19d49aa4ad
Author | SHA1 | Date | |
---|---|---|---|
19d49aa4ad | |||
b9bed0d0dc |
1 changed files with 17 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption;
|
inherit (lib) mkIf mkEnableOption;
|
||||||
|
@ -7,12 +7,27 @@ in
|
||||||
{
|
{
|
||||||
options.snowhawk.dwm = {
|
options.snowhawk.dwm = {
|
||||||
enable = mkEnableOption "niri home-manager module";
|
enable = mkEnableOption "niri home-manager module";
|
||||||
|
|
||||||
|
useXFixes = mkEnableOption "using unclutter-xfixes instead of unclutter";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# WM Stuff
|
# WM Stuff
|
||||||
xsession.numlock.enable = true;
|
xsession.numlock.enable = true;
|
||||||
services.unclutter.enable = true;
|
|
||||||
|
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}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue