2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.services.xbanish;
|
|
|
|
|
|
|
|
in {
|
|
|
|
options.services.xbanish = {
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "xbanish");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
arguments = mkOption {
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "Arguments to pass to xbanish command";
|
2020-04-24 23:36:52 +00:00
|
|
|
default = "";
|
|
|
|
example = "-d -i shift";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user.services.xbanish = {
|
|
|
|
description = "xbanish hides the mouse pointer";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
|
|
|
serviceConfig.ExecStart = ''
|
|
|
|
${pkgs.xbanish}/bin/xbanish ${cfg.arguments}
|
|
|
|
'';
|
|
|
|
serviceConfig.Restart = "always";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|