fork/home-manager
git clone https://git.julia.blue/fork/home-manager
5f433eb1
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4let cfg = config . services . devilspie2 ; 5in { 6meta . maintainers = [ maintainers . dawidsowa ]; 7 8options = { 9services . devilspie2 = { 10enable = mkEnableOption '' 11Devilspie2, a window matching utility, allowing the user to 12perform scripted actions on windows as they are created'' ; 13 14config = mkOption { 15type = types . lines ; 16default = "" ; 17description = '' 18Content of file placed in the devilspie2 config directory. 19'' ; 20example = '' 21if (get_window_class() == "Gnome-terminal") then 22make_always_on_top(); 23end 24'' ; 25}; 26}; 27}; 28 29config = mkIf cfg . enable { 30assertions = [ 31( lib . hm . assertions . assertPlatform "services.devilspie2" pkgs 32lib . platforms . linux ) 33]; 34 35systemd . user . services . devilspie2 = { 36Service . ExecStart = " ${ pkgs . devilspie2 } /bin/devilspie2" ; 37Unit = { 38Description = "devilspie2" ; 39After = [ "graphical-session-pre.target" ]; 40PartOf = [ "graphical-session.target" ]; 41}; 42Install . WantedBy = [ "graphical-session.target" ]; 43}; 44 45xdg . configFile . "devilspie2/config.lua" . text = cfg . config ; 46}; 47}