2022-11-11 11:54:21 +01:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.services.xbanish;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.eboskma.services.xbanish = {
|
|
|
|
enable = mkEnableOption "xbanish";
|
|
|
|
|
|
|
|
arguments = mkOption {
|
|
|
|
description = "Arguments to pass to xbanish command";
|
|
|
|
default = "";
|
|
|
|
example = "-d -i shift";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-11-19 20:00:54 +01:00
|
|
|
config = mkIf cfg.enable {
|
2022-11-11 11:54:21 +01:00
|
|
|
systemd.user.services.xbanish = {
|
|
|
|
Unit = {
|
|
|
|
Description = "xbanish hides the mouse pointer when typing";
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = ''
|
|
|
|
${pkgs.xbanish}/bin/xbanish ${cfg.arguments}
|
|
|
|
'';
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|