fork/home-manager
git clone https://git.julia.blue/fork/home-manager
f5b920f4
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . xsession . windowManager . fluxbox ; 8 9in { 10meta . maintainers = [ maintainers . AndersonTorres ]; 11 12options = { 13xsession . windowManager . fluxbox = { 14enable = mkEnableOption "Fluxbox window manager" ; 15 16package = mkPackageOption pkgs "fluxbox" { }; 17 18init = mkOption { 19type = types . lines ; 20default = "" ; 21description = '' 22Init configuration for Fluxbox, written to 23{file}`~/.fluxbox/init`. Look at the 24{manpage}`fluxbox(1)` manpage for details. 25'' ; 26}; 27 28apps = mkOption { 29type = types . lines ; 30default = "" ; 31description = '' 32Apps configuration for Fluxbox, written to 33{file}`~/.fluxbox/apps`. Look at the 34{manpage}`fluxbox(1)` manpage for details. 35'' ; 36}; 37 38keys = mkOption { 39type = types . lines ; 40default = "" ; 41description = '' 42Keyboard shortcuts configuration for Fluxbox, written to 43{file}`~/.fluxbox/keys`. Look at the 44{manpage}`fluxbox-keys(1)` manpage for details. 45'' ; 46}; 47 48menu = mkOption { 49type = types . lines ; 50default = "" ; 51description = '' 52Menu configuration for Fluxbox, written to 53{file}`~/.fluxbox/menu`. Look at the 54{manpage}`fluxbox-menu(1)` manpage for details. 55'' ; 56}; 57 58slitlist = mkOption { 59type = types . lines ; 60default = "" ; 61description = '' 62Slitlist configuration for Fluxbox, written to 63{file}`~/.fluxbox/slitlist`. Look at the 64{manpage}`fluxbox(1)` manpage for details. 65'' ; 66}; 67 68windowmenu = mkOption { 69type = types . lines ; 70default = "" ; 71description = '' 72Window menu configuration for Fluxbox, written to 73{file}`~/.fluxbox/windowmenu`. Look at the 74{manpage}`fluxbox-menu(1)` 75manpage for details. 76'' ; 77}; 78 79extraCommandLineArgs = mkOption { 80type = with types ; listOf str ; 81default = [ ]; 82example = [ "-log" "/tmp/fluxbox.log" ]; 83description = '' 84Extra command line arguments to pass to {command}`fluxbox`. 85Look at the 86{manpage}`fluxbox(1)` manpage for details. 87'' ; 88}; 89}; 90}; 91 92config = mkIf cfg . enable { 93assertions = [ 94( hm . assertions . assertPlatform "xsession.windowManager.fluxbox" pkgs 95platforms . linux ) 96]; 97 98home . packages = [ cfg . package ]; 99 100home . file = { 101".fluxbox/init" = mkIf ( cfg . init != "" ) { text = cfg . init ; }; 102".fluxbox/apps" = mkIf ( cfg . apps != "" ) { text = cfg . apps ; }; 103".fluxbox/keys" = mkIf ( cfg . keys != "" ) { text = cfg . keys ; }; 104".fluxbox/menu" = mkIf ( cfg . menu != "" ) { text = cfg . menu ; }; 105".fluxbox/slitlist" = mkIf ( cfg . slitlist != "" ) { text = cfg . slitlist ; }; 106".fluxbox/windowmenu" = 107mkIf ( cfg . windowmenu != "" ) { text = cfg . windowmenu ; }; 108}; 109 110xsession . windowManager . command = escapeShellArgs 111([ " ${ cfg . package } /bin/fluxbox" ] ++ remove "" cfg . extraCommandLineArgs ); 112}; 113}