2022-08-29 02:43:14 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.xsession.windowManager.fluxbox;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.AndersonTorres ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
xsession.windowManager.fluxbox = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "Fluxbox window manager";
|
2022-08-29 02:43:14 +02:00
|
|
|
|
2023-07-02 01:45:18 +02:00
|
|
|
package = mkPackageOption pkgs "fluxbox" { };
|
2022-08-29 02:43:14 +02:00
|
|
|
|
|
|
|
init = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Init configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/init`. Look at the
|
|
|
|
{manpage}`fluxbox(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
apps = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Apps configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/apps`. Look at the
|
|
|
|
{manpage}`fluxbox(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
keys = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Keyboard shortcuts configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/keys`. Look at the
|
|
|
|
{manpage}`fluxbox-keys(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
menu = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Menu configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/menu`. Look at the
|
|
|
|
{manpage}`fluxbox-menu(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
slitlist = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Slitlist configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/slitlist`. Look at the
|
|
|
|
{manpage}`fluxbox(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
windowmenu = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2022-08-29 02:43:14 +02:00
|
|
|
Window menu configuration for Fluxbox, written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`~/.fluxbox/windowmenu`. Look at the
|
|
|
|
{manpage}`fluxbox-menu(1)`
|
2022-08-29 02:43:14 +02:00
|
|
|
manpage for details.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
extraCommandLineArgs = mkOption {
|
|
|
|
type = with types; listOf str;
|
|
|
|
default = [ ];
|
|
|
|
example = [ "-log" "/tmp/fluxbox.log" ];
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2023-07-01 01:30:13 +02:00
|
|
|
Extra command line arguments to pass to {command}`fluxbox`.
|
2022-08-29 02:43:14 +02:00
|
|
|
Look at the
|
2023-07-01 01:30:13 +02:00
|
|
|
{manpage}`fluxbox(1)` manpage for details.
|
2022-08-29 02:43:14 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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" =
|
2023-01-03 21:09:52 +01:00
|
|
|
mkIf (cfg.windowmenu != "") { text = cfg.windowmenu; };
|
2022-08-29 02:43:14 +02:00
|
|
|
};
|
|
|
|
|
2023-09-19 20:52:50 +02:00
|
|
|
xsession.windowManager.command = escapeShellArgs
|
|
|
|
([ "${cfg.package}/bin/fluxbox" ] ++ remove "" cfg.extraCommandLineArgs);
|
2022-08-29 02:43:14 +02:00
|
|
|
};
|
|
|
|
}
|