mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
fluxbox: add module
This commit is contained in:
parent
f5e4614c11
commit
f17819f4f1
4 changed files with 138 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -484,6 +484,8 @@ Makefile @thiagokokada
|
|||
/modules/services/window-managers/bspwm @ncfavier
|
||||
/tests/modules/services/window-managers/bspwm @ncfavier
|
||||
|
||||
/modules/services/window-managers/fluxbox.nix @AndersonTorres
|
||||
|
||||
/modules/services/window-managers/herbstluftwm @olmokramer
|
||||
/tests/modules/services/window-managers/herbstluftwm @olmokramer
|
||||
|
||||
|
|
|
@ -696,6 +696,14 @@ in
|
|||
A new module is available: 'programs.gallery-dl'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-09-21T22:42:42+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'xsession.windowManager.fluxbox'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -276,6 +276,7 @@ let
|
|||
./services/volnoti.nix
|
||||
./services/window-managers/awesome.nix
|
||||
./services/window-managers/bspwm/default.nix
|
||||
./services/window-managers/fluxbox.nix
|
||||
./services/window-managers/herbstluftwm.nix
|
||||
./services/window-managers/i3-sway/i3.nix
|
||||
./services/window-managers/i3-sway/sway.nix
|
||||
|
|
127
modules/services/window-managers/fluxbox.nix
Normal file
127
modules/services/window-managers/fluxbox.nix
Normal file
|
@ -0,0 +1,127 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.xsession.windowManager.fluxbox;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.AndersonTorres ];
|
||||
|
||||
options = {
|
||||
xsession.windowManager.fluxbox = {
|
||||
enable = mkEnableOption "Fluxbox window manager";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.fluxbox;
|
||||
defaultText = literalExpression "pkgs.fluxbox";
|
||||
description = "Package to use for running Fluxbox WM.";
|
||||
};
|
||||
|
||||
init = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Init configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/init</filename>. Look at the
|
||||
<citerefentry>
|
||||
<refentrytitle>fluxbox</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
apps = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Apps configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/apps</filename>. Look at the
|
||||
<citerefentry><refentrytitle>fluxbox</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
keys = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Keyboard shortcuts configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/keys</filename>. Look at the
|
||||
<citerefentry><refentrytitle>fluxbox-keys</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
menu = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Menu configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/menu</filename>. Look at the
|
||||
<citerefentry><refentrytitle>fluxbox-menu</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
slitlist = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Slitlist configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/slitlist</filename>. Look at the
|
||||
<citerefentry><refentrytitle>fluxbox</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
windowmenu = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Window menu configuration for Fluxbox, written to
|
||||
<filename>~/.fluxbox/windowmenu</filename>. Look at the
|
||||
<citerefentry><refentrytitle>fluxbox-menu</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry>
|
||||
manpage for details.
|
||||
'';
|
||||
};
|
||||
|
||||
extraCommandLineArgs = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
example = [ "-log" "/tmp/fluxbox.log" ];
|
||||
description = ''
|
||||
Extra command line arguments to pass to <command>fluxbox</command>.
|
||||
Look at the
|
||||
<citerefentry><refentrytitle>fluxbox</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry> manpage for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "xsession.windowManager.fluxbox" pkgs
|
||||
platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.file = {
|
||||
".fluxbox/init" = mkIf (cfg.init != "") { text = cfg.init; };
|
||||
".fluxbox/apps" = mkIf (cfg.apps != "") { text = cfg.apps; };
|
||||
".fluxbox/keys" = mkIf (cfg.keys != "") { text = cfg.keys; };
|
||||
".fluxbox/menu" = mkIf (cfg.menu != "") { text = cfg.menu; };
|
||||
".fluxbox/slitlist" = mkIf (cfg.slitlist != "") { text = cfg.slitlist; };
|
||||
".fluxbox/windowmenu" =
|
||||
mkIf (cfg.windowMenu != "") { text = cfg.windowmenu; };
|
||||
};
|
||||
|
||||
xsession.windowManager.command = concatStringsSep " "
|
||||
([ "${cfg.package}/bin/fluxbox" ]
|
||||
++ escapeShellArgs (remove "" cfg.extraCommandLineArgs));
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue