2023-01-08 21:05:36 +00:00
|
|
|
|
{ config, lib, moduleName, cfg, pkgs, capitalModuleName ? moduleName }:
|
2019-09-04 02:30:44 +00:00
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
|
|
let
|
2021-01-11 17:18:32 +00:00
|
|
|
|
isI3 = moduleName == "i3";
|
|
|
|
|
isSway = !isI3;
|
|
|
|
|
|
2023-01-08 21:05:36 +00:00
|
|
|
|
inherit (config.home) stateVersion;
|
|
|
|
|
|
2021-05-04 03:54:35 +00:00
|
|
|
|
fontOptions = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
names = mkOption {
|
|
|
|
|
type = types.listOf types.str;
|
|
|
|
|
default = [ "monospace" ];
|
2021-10-09 09:14:08 +00:00
|
|
|
|
defaultText = literalExpression ''[ "monospace" ]'';
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-05-04 03:54:35 +00:00
|
|
|
|
List of font names list used for window titles. Only FreeType fonts are supported.
|
|
|
|
|
The order here is important (e.g. icons font should go before the one used for text).
|
|
|
|
|
'';
|
2021-10-09 09:14:08 +00:00
|
|
|
|
example = literalExpression ''[ "FontAwesome" "Terminus" ]'';
|
2021-05-04 03:54:35 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
style = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
default = "";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-05-04 03:54:35 +00:00
|
|
|
|
The font style to use for window titles.
|
|
|
|
|
'';
|
|
|
|
|
example = "Bold Semi-Condensed";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
size = mkOption {
|
|
|
|
|
type = types.float;
|
|
|
|
|
default = 8.0;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-05-04 03:54:35 +00:00
|
|
|
|
The font size to use for window titles.
|
|
|
|
|
'';
|
|
|
|
|
example = 11.5;
|
|
|
|
|
};
|
|
|
|
|
};
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
startupModule = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
command = mkOption {
|
|
|
|
|
type = types.str;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Command that will be executed on startup.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
always = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Whether to run command on each ${moduleName} restart.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
2021-01-11 17:18:32 +00:00
|
|
|
|
} // optionalAttrs isI3 {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
notification = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Whether to enable startup-notification support for the command.
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See {option}`--no-startup-id` option description in the i3 user guide.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
workspace = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Launch application on a particular workspace. DEPRECATED:
|
2023-06-30 23:30:13 +00:00
|
|
|
|
Use [](#opt-xsession.windowManager.i3.config.assigns)
|
|
|
|
|
instead. See <https://github.com/nix-community/home-manager/issues/265>.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
barModule = types.submodule {
|
2020-07-13 11:31:55 +00:00
|
|
|
|
options = let
|
2023-01-08 21:05:36 +00:00
|
|
|
|
versionAtLeast2009 = versionAtLeast stateVersion "20.09";
|
2020-07-13 11:31:55 +00:00
|
|
|
|
mkNullableOption = { type, default, ... }@args:
|
2021-05-05 22:12:48 +00:00
|
|
|
|
mkOption (args // {
|
2020-07-13 11:31:55 +00:00
|
|
|
|
type = types.nullOr type;
|
2021-05-05 22:12:48 +00:00
|
|
|
|
default = if versionAtLeast2009 then null else default;
|
2021-10-09 09:14:08 +00:00
|
|
|
|
defaultText = literalExpression ''
|
2021-05-05 22:12:48 +00:00
|
|
|
|
null for state version ≥ 20.09, as example otherwise
|
2020-07-13 11:31:55 +00:00
|
|
|
|
'';
|
2021-05-05 22:12:48 +00:00
|
|
|
|
example = default;
|
2020-07-13 11:31:55 +00:00
|
|
|
|
});
|
|
|
|
|
in {
|
2021-05-04 03:54:35 +00:00
|
|
|
|
fonts = mkOption {
|
|
|
|
|
type = with types; either (listOf str) fontOptions;
|
|
|
|
|
default = { };
|
2021-10-09 09:14:08 +00:00
|
|
|
|
example = literalExpression ''
|
2021-05-04 14:31:37 +00:00
|
|
|
|
{
|
|
|
|
|
names = [ "DejaVu Sans Mono" "FontAwesome5Free" ];
|
|
|
|
|
style = "Bold Semi-Condensed";
|
|
|
|
|
size = 11.0;
|
|
|
|
|
}
|
|
|
|
|
'';
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Font configuration for this bar.";
|
2021-05-04 03:54:35 +00:00
|
|
|
|
};
|
2019-09-04 02:30:44 +00:00
|
|
|
|
|
|
|
|
|
extraConfig = mkOption {
|
|
|
|
|
type = types.lines;
|
|
|
|
|
default = "";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Extra configuration lines for this bar.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
id = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Specifies the bar ID for the configured bar instance.
|
|
|
|
|
If this option is missing, the ID is set to bar-x, where x corresponds
|
|
|
|
|
to the position of the embedding bar block in the config file.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
mode = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.enum [ "dock" "hide" "invisible" ];
|
|
|
|
|
default = "dock";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Bar visibility mode.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
hiddenState = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.enum [ "hide" "show" ];
|
|
|
|
|
default = "hide";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "The default bar mode when 'bar.mode' == 'hide'.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
position = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.enum [ "top" "bottom" ];
|
|
|
|
|
default = "bottom";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "The edge of the screen ${moduleName}bar should show up.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
workspaceButtons = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.bool;
|
|
|
|
|
default = true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Whether workspace buttons should be shown or not.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
workspaceNumbers = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.bool;
|
|
|
|
|
default = true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2019-09-04 02:30:44 +00:00
|
|
|
|
"Whether workspace numbers should be displayed within the workspace buttons.";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
command = mkOption {
|
|
|
|
|
type = types.str;
|
2021-01-11 17:26:18 +00:00
|
|
|
|
default = let
|
|
|
|
|
# If the user uses the "system" Sway (i.e. cfg.package == null) then the bar has
|
|
|
|
|
# to come from a different package
|
|
|
|
|
pkg = if isSway && isNull cfg.package then pkgs.sway else cfg.package;
|
|
|
|
|
in "${pkg}/bin/${moduleName}bar";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
defaultText = "i3bar";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Command that will be used to start a bar.";
|
2021-01-11 17:18:32 +00:00
|
|
|
|
example = if isI3 then
|
2023-01-08 21:05:36 +00:00
|
|
|
|
"\${pkgs.i3}/bin/i3bar -t"
|
2019-09-04 02:30:44 +00:00
|
|
|
|
else
|
|
|
|
|
"\${pkgs.waybar}/bin/waybar";
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-05 22:12:48 +00:00
|
|
|
|
statusCommand = mkNullableOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
default = "${pkgs.i3status}/bin/i3status";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Command that will be used to get status lines.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
colors = mkOption {
|
|
|
|
|
type = types.submodule {
|
|
|
|
|
options = {
|
2020-07-13 11:31:55 +00:00
|
|
|
|
background = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.str;
|
|
|
|
|
default = "#000000";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Background color of the bar.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
statusline = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.str;
|
|
|
|
|
default = "#ffffff";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Text color to be used for the statusline.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
separator = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.str;
|
|
|
|
|
default = "#666666";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Text color to be used for the separator.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-06-23 02:56:41 +00:00
|
|
|
|
focusedBackground = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2021-06-23 02:56:41 +00:00
|
|
|
|
"Background color of the bar on the currently focused monitor output.";
|
|
|
|
|
example = "#000000";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
focusedStatusline = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2021-06-23 02:56:41 +00:00
|
|
|
|
"Text color to be used for the statusline on the currently focused monitor output.";
|
|
|
|
|
example = "#ffffff";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
focusedSeparator = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2021-06-23 02:56:41 +00:00
|
|
|
|
"Text color to be used for the separator on the currently focused monitor output.";
|
|
|
|
|
example = "#666666";
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
focusedWorkspace = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = barColorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#4c7899";
|
|
|
|
|
background = "#285577";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Border, background and text color for a workspace button when the workspace has focus.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
activeWorkspace = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = barColorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#5f676a";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Border, background and text color for a workspace button when the workspace is active.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
inactiveWorkspace = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = barColorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#222222";
|
|
|
|
|
text = "#888888";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Border, background and text color for a workspace button when the workspace does not
|
|
|
|
|
have focus and is not active.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
urgentWorkspace = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = barColorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#2f343a";
|
|
|
|
|
background = "#900000";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Border, background and text color for a workspace button when the workspace contains
|
|
|
|
|
a window with the urgency hint set.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
bindingMode = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = barColorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#2f343a";
|
|
|
|
|
background = "#900000";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2019-09-04 02:30:44 +00:00
|
|
|
|
"Border, background and text color for the binding mode indicator";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Bar color settings. All color classes can be specified using submodules
|
|
|
|
|
with 'border', 'background', 'text', fields and RGB color hex-codes as values.
|
|
|
|
|
See default values for the reference.
|
|
|
|
|
Note that 'background', 'status', and 'separator' parameters take a single RGB value.
|
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#_colors>.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-13 11:31:55 +00:00
|
|
|
|
trayOutput = mkNullableOption {
|
2019-09-04 02:30:44 +00:00
|
|
|
|
type = types.str;
|
|
|
|
|
default = "primary";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Where to output tray.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
2023-04-16 23:34:29 +00:00
|
|
|
|
|
|
|
|
|
trayPadding = mkNullableOption {
|
|
|
|
|
type = types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2023-04-16 23:34:29 +00:00
|
|
|
|
Sets the pixel padding of the system tray.
|
|
|
|
|
This padding will surround the tray on all sides and between each item.
|
|
|
|
|
'';
|
|
|
|
|
};
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
barColorSetModule = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
border = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
background = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
text = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
colorSetModule = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
border = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
childBorder = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
background = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
text = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
indicator = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
visible = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
windowCommandModule = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
command = mkOption {
|
|
|
|
|
type = types.str;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "${capitalModuleName}wm command to execute.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = "border pixel 1";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
criteria = mkOption {
|
|
|
|
|
type = criteriaModule;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-08-22 00:41:06 +00:00
|
|
|
|
Criteria of the windows on which command should be executed.
|
2023-06-30 23:30:13 +00:00
|
|
|
|
|
|
|
|
|
A value of `true` is equivalent to using an empty
|
2021-08-22 00:41:06 +00:00
|
|
|
|
criteria (which is different from an empty string criteria).
|
|
|
|
|
'';
|
2021-10-09 09:14:08 +00:00
|
|
|
|
example = literalExpression ''
|
2021-08-22 00:41:06 +00:00
|
|
|
|
{
|
|
|
|
|
title = "x200: ~/work";
|
|
|
|
|
floating = true;
|
|
|
|
|
};
|
|
|
|
|
'';
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-22 00:41:06 +00:00
|
|
|
|
criteriaModule = types.attrsOf (types.either types.str types.bool);
|
2019-09-04 02:30:44 +00:00
|
|
|
|
in {
|
2021-05-04 03:54:35 +00:00
|
|
|
|
fonts = mkOption {
|
|
|
|
|
type = with types; either (listOf str) fontOptions;
|
|
|
|
|
default = { };
|
2021-10-09 09:14:08 +00:00
|
|
|
|
example = literalExpression ''
|
2021-05-04 14:31:37 +00:00
|
|
|
|
{
|
|
|
|
|
names = [ "DejaVu Sans Mono" "FontAwesome5Free" ];
|
|
|
|
|
style = "Bold Semi-Condensed";
|
|
|
|
|
size = 11.0;
|
|
|
|
|
}
|
|
|
|
|
'';
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Font configuration for window titles, nagbar...";
|
2021-05-04 03:54:35 +00:00
|
|
|
|
};
|
2019-09-04 02:30:44 +00:00
|
|
|
|
|
|
|
|
|
window = mkOption {
|
|
|
|
|
type = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
titlebar = mkOption {
|
|
|
|
|
type = types.bool;
|
2023-01-08 21:05:36 +00:00
|
|
|
|
default = if versionOlder stateVersion "23.05" then
|
|
|
|
|
(isI3 && (cfg.config.gaps == null))
|
2019-09-04 02:30:44 +00:00
|
|
|
|
else
|
2023-01-08 21:05:36 +00:00
|
|
|
|
true;
|
|
|
|
|
defaultText = if isI3 then ''
|
|
|
|
|
true for state version ≥ 23.05
|
|
|
|
|
config.gaps == null for state version < 23.05
|
|
|
|
|
'' else ''
|
|
|
|
|
true for state version ≥ 23.05
|
|
|
|
|
false for state version < 23.05
|
|
|
|
|
'';
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Whether to show window titlebars.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
border = mkOption {
|
|
|
|
|
type = types.int;
|
|
|
|
|
default = 2;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Window border width.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
hideEdgeBorders = mkOption {
|
|
|
|
|
type = types.enum [ "none" "vertical" "horizontal" "both" "smart" ];
|
|
|
|
|
default = "none";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Hide window borders adjacent to the screen edges.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
commands = mkOption {
|
|
|
|
|
type = types.listOf windowCommandModule;
|
|
|
|
|
default = [ ];
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
List of commands that should be executed on specific windows.
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See {option}`for_window` ${moduleName}wm option documentation.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
example = [{
|
|
|
|
|
command = "border pixel 1";
|
|
|
|
|
criteria = { class = "XTerm"; };
|
|
|
|
|
}];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Window titlebar and border settings.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
floating = mkOption {
|
|
|
|
|
type = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
titlebar = mkOption {
|
|
|
|
|
type = types.bool;
|
2023-01-08 21:05:36 +00:00
|
|
|
|
default = if versionOlder stateVersion "23.05" then
|
|
|
|
|
(isI3 && (cfg.config.gaps == null))
|
2019-09-04 02:30:44 +00:00
|
|
|
|
else
|
2023-01-08 21:05:36 +00:00
|
|
|
|
true;
|
|
|
|
|
defaultText = if isI3 then ''
|
|
|
|
|
true for state version ≥ 23.05
|
|
|
|
|
config.gaps == null for state version < 23.05
|
|
|
|
|
'' else ''
|
|
|
|
|
true for state version ≥ 23.05
|
|
|
|
|
false for state version < 23.05
|
|
|
|
|
'';
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Whether to show floating window titlebars.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
border = mkOption {
|
|
|
|
|
type = types.int;
|
|
|
|
|
default = 2;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Floating windows border width.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
modifier = mkOption {
|
2023-07-14 19:26:09 +00:00
|
|
|
|
type = types.str;
|
2019-09-04 02:30:44 +00:00
|
|
|
|
default = cfg.config.modifier;
|
2020-02-27 07:50:39 +00:00
|
|
|
|
defaultText = "${moduleName}.config.modifier";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2023-07-14 19:26:09 +00:00
|
|
|
|
"Modifier key or keys that can be used to drag floating windows.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = "Mod4";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
criteria = mkOption {
|
|
|
|
|
type = types.listOf criteriaModule;
|
|
|
|
|
default = [ ];
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description =
|
2019-09-04 02:30:44 +00:00
|
|
|
|
"List of criteria for windows that should be opened in a floating mode.";
|
|
|
|
|
example = [
|
|
|
|
|
{ "title" = "Steam - Update News"; }
|
|
|
|
|
{ "class" = "Pavucontrol"; }
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Floating window settings.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
focus = mkOption {
|
|
|
|
|
type = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
newWindow = mkOption {
|
|
|
|
|
type = types.enum [ "smart" "urgent" "focus" "none" ];
|
|
|
|
|
default = "smart";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
This option modifies focus behavior on new window activation.
|
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#focus_on_window_activation>
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
example = "none";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
followMouse = mkOption {
|
2021-01-11 17:18:32 +00:00
|
|
|
|
type = if isSway then
|
2020-05-11 21:56:40 +00:00
|
|
|
|
types.either (types.enum [ "yes" "no" "always" ]) types.bool
|
|
|
|
|
else
|
|
|
|
|
types.bool;
|
2021-01-11 17:18:32 +00:00
|
|
|
|
default = if isSway then "yes" else true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Whether focus should follow the mouse.";
|
2020-05-11 21:56:40 +00:00
|
|
|
|
apply = val:
|
2022-04-08 04:36:13 +00:00
|
|
|
|
if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val;
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-01-15 18:20:13 +00:00
|
|
|
|
wrapping = mkOption {
|
|
|
|
|
type = types.enum [ "yes" "no" "force" "workspace" ];
|
|
|
|
|
default = {
|
|
|
|
|
i3 = if cfg.config.focus.forceWrapping then "force" else "yes";
|
|
|
|
|
# the sway module's logic was inverted and incorrect,
|
|
|
|
|
# so preserve it for backwards compatibility purposes
|
|
|
|
|
sway = if cfg.config.focus.forceWrapping then "yes" else "no";
|
|
|
|
|
}.${moduleName};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2023-01-15 18:20:13 +00:00
|
|
|
|
Whether the window focus commands automatically wrap around the edge of containers.
|
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#_focus_wrapping>
|
2023-01-15 18:20:13 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2019-09-04 02:30:44 +00:00
|
|
|
|
forceWrapping = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2023-01-15 18:20:13 +00:00
|
|
|
|
Whether to force focus wrapping in tabbed or stacked containers.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
This option is deprecated, use {option}`focus.wrapping` instead.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
mouseWarping = mkOption {
|
2022-08-25 19:02:04 +00:00
|
|
|
|
type = if isSway then
|
|
|
|
|
types.oneOf [ types.bool (types.enum [ "container" "output" ]) ]
|
|
|
|
|
else
|
|
|
|
|
types.bool;
|
2019-09-04 02:30:44 +00:00
|
|
|
|
default = true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Whether mouse cursor should be warped to the center of the window when switching focus
|
|
|
|
|
to a window on a different output.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Focus related settings.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
assigns = mkOption {
|
|
|
|
|
type = types.attrsOf (types.listOf criteriaModule);
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
An attribute set that assigns applications to workspaces based
|
|
|
|
|
on criteria.
|
|
|
|
|
'';
|
2021-10-09 09:14:08 +00:00
|
|
|
|
example = literalExpression ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
{
|
|
|
|
|
"1: web" = [{ class = "^Firefox$"; }];
|
|
|
|
|
"0: extra" = [{ class = "^Firefox$"; window_role = "About"; }];
|
|
|
|
|
}
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
modifier = mkOption {
|
|
|
|
|
type = types.enum [ "Shift" "Control" "Mod1" "Mod2" "Mod3" "Mod4" "Mod5" ];
|
|
|
|
|
default = "Mod1";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Modifier key that is used for all default keybindings.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = "Mod4";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
workspaceLayout = mkOption {
|
2021-08-18 02:58:03 +00:00
|
|
|
|
type = types.enum [ "default" "stacking" "tabbed" ];
|
2019-09-04 02:30:44 +00:00
|
|
|
|
default = "default";
|
|
|
|
|
example = "tabbed";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
The mode in which new containers on workspace level will
|
|
|
|
|
start.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
workspaceAutoBackAndForth = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
example = true;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Assume you are on workspace "1: www" and switch to "2: IM" using
|
|
|
|
|
mod+2 because somebody sent you a message. You don’t need to remember
|
|
|
|
|
where you came from now, you can just press $mod+2 again to switch
|
|
|
|
|
back to "1: www".
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
keycodebindings = mkOption {
|
|
|
|
|
type = types.attrsOf (types.nullOr types.str);
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
An attribute set that assigns keypress to an action using key code.
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#keybindings>.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
example = { "214" = "exec /bin/script.sh"; };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
colors = mkOption {
|
|
|
|
|
type = types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
background = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
default = "#ffffff";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Background color of the window. Only applications which do not cover
|
|
|
|
|
the whole area expose the color.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
focused = mkOption {
|
|
|
|
|
type = colorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#4c7899";
|
|
|
|
|
background = "#285577";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
indicator = "#2e9ef4";
|
|
|
|
|
childBorder = "#285577";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "A window which currently has the focus.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
focusedInactive = mkOption {
|
|
|
|
|
type = colorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#5f676a";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
indicator = "#484e50";
|
|
|
|
|
childBorder = "#5f676a";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
A window which is the focused one of its container,
|
|
|
|
|
but it does not have the focus at the moment.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
unfocused = mkOption {
|
|
|
|
|
type = colorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#222222";
|
|
|
|
|
text = "#888888";
|
|
|
|
|
indicator = "#292d2e";
|
|
|
|
|
childBorder = "#222222";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "A window which is not focused.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
urgent = mkOption {
|
|
|
|
|
type = colorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#2f343a";
|
|
|
|
|
background = "#900000";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
indicator = "#900000";
|
|
|
|
|
childBorder = "#900000";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "A window which has its urgency hint activated.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
placeholder = mkOption {
|
|
|
|
|
type = colorSetModule;
|
|
|
|
|
default = {
|
|
|
|
|
border = "#000000";
|
|
|
|
|
background = "#0c0c0c";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
indicator = "#000000";
|
|
|
|
|
childBorder = "#0c0c0c";
|
|
|
|
|
};
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Background and text color are used to draw placeholder window
|
|
|
|
|
contents (when restoring layouts). Border and indicator are ignored.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
default = { };
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Color settings. All color classes can be specified using submodules
|
|
|
|
|
with 'border', 'background', 'text', 'indicator' and 'childBorder' fields
|
|
|
|
|
and RGB color hex-codes as values. See default values for the reference.
|
|
|
|
|
Note that '${moduleName}.config.colors.background' parameter takes a single RGB value.
|
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#_changing_colors>.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bars = mkOption {
|
|
|
|
|
type = types.listOf barModule;
|
2023-01-08 21:05:36 +00:00
|
|
|
|
default = if versionAtLeast stateVersion "20.09" then [{
|
2020-07-13 11:31:55 +00:00
|
|
|
|
mode = "dock";
|
|
|
|
|
hiddenState = "hide";
|
|
|
|
|
position = "bottom";
|
|
|
|
|
workspaceButtons = true;
|
|
|
|
|
workspaceNumbers = true;
|
|
|
|
|
statusCommand = "${pkgs.i3status}/bin/i3status";
|
2021-05-04 03:54:35 +00:00
|
|
|
|
fonts = {
|
|
|
|
|
names = [ "monospace" ];
|
|
|
|
|
size = 8.0;
|
|
|
|
|
};
|
2020-07-13 11:31:55 +00:00
|
|
|
|
trayOutput = "primary";
|
|
|
|
|
colors = {
|
|
|
|
|
background = "#000000";
|
|
|
|
|
statusline = "#ffffff";
|
|
|
|
|
separator = "#666666";
|
|
|
|
|
focusedWorkspace = {
|
|
|
|
|
border = "#4c7899";
|
|
|
|
|
background = "#285577";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
|
|
|
|
activeWorkspace = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#5f676a";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
|
|
|
|
inactiveWorkspace = {
|
|
|
|
|
border = "#333333";
|
|
|
|
|
background = "#222222";
|
|
|
|
|
text = "#888888";
|
|
|
|
|
};
|
|
|
|
|
urgentWorkspace = {
|
|
|
|
|
border = "#2f343a";
|
|
|
|
|
background = "#900000";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
|
|
|
|
bindingMode = {
|
|
|
|
|
border = "#2f343a";
|
|
|
|
|
background = "#900000";
|
|
|
|
|
text = "#ffffff";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}] else
|
|
|
|
|
[ { } ];
|
2021-10-09 09:14:08 +00:00
|
|
|
|
defaultText = literalExpression "see code";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
${capitalModuleName} bars settings blocks. Set to empty list to remove bars completely.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
startup = mkOption {
|
|
|
|
|
type = types.listOf startupModule;
|
|
|
|
|
default = [ ];
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Commands that should be executed at startup.
|
|
|
|
|
|
2023-06-30 23:30:13 +00:00
|
|
|
|
See <https://i3wm.org/docs/userguide.html#_automatically_starting_applications_on_i3_startup>.
|
2019-09-04 02:30:44 +00:00
|
|
|
|
'';
|
2021-01-11 17:18:32 +00:00
|
|
|
|
example = if isI3 then
|
2021-10-09 09:14:08 +00:00
|
|
|
|
literalExpression ''
|
2020-09-24 09:16:54 +00:00
|
|
|
|
[
|
|
|
|
|
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
|
|
|
|
{ command = "dropbox start"; notification = false; }
|
2023-07-05 10:23:31 +00:00
|
|
|
|
{ command = "firefox"; }
|
2020-09-24 09:16:54 +00:00
|
|
|
|
];
|
|
|
|
|
''
|
|
|
|
|
else
|
2021-10-09 09:14:08 +00:00
|
|
|
|
literalExpression ''
|
2020-09-24 09:16:54 +00:00
|
|
|
|
[
|
|
|
|
|
{ command = "systemctl --user restart waybar"; always = true; }
|
|
|
|
|
{ command = "dropbox start"; }
|
|
|
|
|
{ command = "firefox"; }
|
|
|
|
|
]
|
|
|
|
|
'';
|
2019-09-04 02:30:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
gaps = mkOption {
|
|
|
|
|
type = types.nullOr (types.submodule {
|
|
|
|
|
options = {
|
|
|
|
|
inner = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Inner gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 12;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
outer = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Outer gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
horizontal = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Horizontal gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
vertical = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Vertical gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
top = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Top gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
left = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Left gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bottom = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Bottom gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
right = mkOption {
|
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Right gaps value.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = 5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
smartGaps = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
This option controls whether to disable all gaps (outer and inner)
|
|
|
|
|
on workspace with a single container.
|
|
|
|
|
'';
|
|
|
|
|
example = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
smartBorders = mkOption {
|
|
|
|
|
type = types.enum [ "on" "off" "no_gaps" ];
|
|
|
|
|
default = "off";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
This option controls whether to disable container borders on
|
|
|
|
|
workspace with a single container.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2019-09-04 02:30:44 +00:00
|
|
|
|
Gaps related settings.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
terminal = mkOption {
|
|
|
|
|
type = types.str;
|
2023-01-03 18:26:08 +00:00
|
|
|
|
default = if isI3 then "i3-sensible-terminal" else "${pkgs.foot}/bin/foot";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Default terminal to run.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = "alacritty";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
menu = mkOption {
|
|
|
|
|
type = types.str;
|
2021-01-11 17:18:32 +00:00
|
|
|
|
default = if isSway then
|
2019-09-04 02:30:44 +00:00
|
|
|
|
"${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"
|
|
|
|
|
else
|
|
|
|
|
"${pkgs.dmenu}/bin/dmenu_run";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Default launcher to use.";
|
2019-09-04 02:30:44 +00:00
|
|
|
|
example = "bemenu-run";
|
|
|
|
|
};
|
2021-05-17 04:54:53 +00:00
|
|
|
|
|
|
|
|
|
defaultWorkspace = mkOption {
|
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
|
default = null;
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-05-17 04:54:53 +00:00
|
|
|
|
The default workspace to show when ${
|
|
|
|
|
if isSway then "sway" else "i3"
|
|
|
|
|
} is launched.
|
|
|
|
|
This must to correspond to the value of the keybinding of the default workspace.
|
|
|
|
|
'';
|
|
|
|
|
example = "workspace number 9";
|
|
|
|
|
};
|
2021-06-03 00:03:20 +00:00
|
|
|
|
|
|
|
|
|
workspaceOutputAssign = mkOption {
|
|
|
|
|
type = with types;
|
|
|
|
|
let
|
|
|
|
|
workspaceOutputOpts = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
workspace = mkOption {
|
|
|
|
|
type = str;
|
|
|
|
|
default = "";
|
|
|
|
|
example = "Web";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2021-06-03 00:03:20 +00:00
|
|
|
|
Name of the workspace to assign.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
output = mkOption {
|
2023-07-14 19:25:55 +00:00
|
|
|
|
type = with types; either str (listOf str);
|
2021-06-03 00:03:20 +00:00
|
|
|
|
default = "";
|
2023-07-14 19:25:55 +00:00
|
|
|
|
apply = lists.toList;
|
2021-06-03 00:03:20 +00:00
|
|
|
|
example = "eDP";
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = ''
|
2023-06-30 23:30:13 +00:00
|
|
|
|
Name(s) of the output(s) from {command}`
|
2021-06-03 00:03:20 +00:00
|
|
|
|
${if isSway then "swaymsg" else "i3-msg"} -t get_outputs
|
2023-06-30 23:30:13 +00:00
|
|
|
|
`.
|
2021-06-03 00:03:20 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
in listOf workspaceOutputOpts;
|
|
|
|
|
default = [ ];
|
2023-07-01 23:45:18 +00:00
|
|
|
|
description = "Assign workspaces to outputs.";
|
2021-06-03 00:03:20 +00:00
|
|
|
|
};
|
2019-09-04 02:30:44 +00:00
|
|
|
|
}
|