mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
style: nix fmt
This commit is contained in:
parent
7913481b66
commit
6e0cc170eb
112 changed files with 1977 additions and 1739 deletions
|
|
@ -1,8 +1,12 @@
|
|||
{ config, lib, moduleName, cfg, pkgs, capitalModuleName ? moduleName }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
moduleName,
|
||||
cfg,
|
||||
pkgs,
|
||||
capitalModuleName ? moduleName,
|
||||
}:
|
||||
with lib; let
|
||||
isI3 = moduleName == "i3";
|
||||
isSway = !isI3;
|
||||
|
||||
|
|
@ -12,7 +16,7 @@ let
|
|||
options = {
|
||||
names = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "monospace" ];
|
||||
default = ["monospace"];
|
||||
defaultText = literalExpression ''[ "monospace" ]'';
|
||||
description = ''
|
||||
List of font names list used for window titles. Only FreeType fonts are supported.
|
||||
|
|
@ -42,56 +46,65 @@ let
|
|||
};
|
||||
|
||||
startupModule = types.submodule {
|
||||
options = {
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
description = "Command that will be executed on startup.";
|
||||
};
|
||||
options =
|
||||
{
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
description = "Command that will be executed on startup.";
|
||||
};
|
||||
|
||||
always = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to run command on each ${moduleName} restart.";
|
||||
};
|
||||
} // optionalAttrs isI3 {
|
||||
notification = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable startup-notification support for the command.
|
||||
See {option}`--no-startup-id` option description in the i3 user guide.
|
||||
'';
|
||||
};
|
||||
always = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to run command on each ${moduleName} restart.";
|
||||
};
|
||||
}
|
||||
// optionalAttrs isI3 {
|
||||
notification = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable startup-notification support for the command.
|
||||
See {option}`--no-startup-id` option description in the i3 user guide.
|
||||
'';
|
||||
};
|
||||
|
||||
workspace = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Launch application on a particular workspace. DEPRECATED:
|
||||
Use [](#opt-xsession.windowManager.i3.config.assigns)
|
||||
instead. See <https://github.com/nix-community/home-manager/issues/265>.
|
||||
'';
|
||||
workspace = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Launch application on a particular workspace. DEPRECATED:
|
||||
Use [](#opt-xsession.windowManager.i3.config.assigns)
|
||||
instead. See <https://github.com/nix-community/home-manager/issues/265>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
barModule = types.submodule {
|
||||
options = let
|
||||
versionAtLeast2009 = versionAtLeast stateVersion "20.09";
|
||||
mkNullableOption = { type, default, ... }@args:
|
||||
mkOption (args // {
|
||||
type = types.nullOr type;
|
||||
default = if versionAtLeast2009 then null else default;
|
||||
defaultText = literalExpression ''
|
||||
null for state version ≥ 20.09, as example otherwise
|
||||
'';
|
||||
example = default;
|
||||
});
|
||||
mkNullableOption = {
|
||||
type,
|
||||
default,
|
||||
...
|
||||
} @ args:
|
||||
mkOption (args
|
||||
// {
|
||||
type = types.nullOr type;
|
||||
default =
|
||||
if versionAtLeast2009
|
||||
then null
|
||||
else default;
|
||||
defaultText = literalExpression ''
|
||||
null for state version ≥ 20.09, as example otherwise
|
||||
'';
|
||||
example = default;
|
||||
});
|
||||
in {
|
||||
fonts = mkOption {
|
||||
type = with types; either (listOf str) fontOptions;
|
||||
default = { };
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
names = [ "DejaVu Sans Mono" "FontAwesome5Free" ];
|
||||
|
|
@ -119,19 +132,19 @@ let
|
|||
};
|
||||
|
||||
mode = mkNullableOption {
|
||||
type = types.enum [ "dock" "hide" "invisible" ];
|
||||
type = types.enum ["dock" "hide" "invisible"];
|
||||
default = "dock";
|
||||
description = "Bar visibility mode.";
|
||||
};
|
||||
|
||||
hiddenState = mkNullableOption {
|
||||
type = types.enum [ "hide" "show" ];
|
||||
type = types.enum ["hide" "show"];
|
||||
default = "hide";
|
||||
description = "The default bar mode when 'bar.mode' == 'hide'.";
|
||||
};
|
||||
|
||||
position = mkNullableOption {
|
||||
type = types.enum [ "top" "bottom" ];
|
||||
type = types.enum ["top" "bottom"];
|
||||
default = "bottom";
|
||||
description = "The edge of the screen ${moduleName}bar should show up.";
|
||||
};
|
||||
|
|
@ -145,8 +158,7 @@ let
|
|||
workspaceNumbers = mkNullableOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description =
|
||||
"Whether workspace numbers should be displayed within the workspace buttons.";
|
||||
description = "Whether workspace numbers should be displayed within the workspace buttons.";
|
||||
};
|
||||
|
||||
command = mkOption {
|
||||
|
|
@ -154,14 +166,17 @@ let
|
|||
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;
|
||||
pkg =
|
||||
if isSway && (cfg.package == null)
|
||||
then pkgs.sway
|
||||
else cfg.package;
|
||||
in "${pkg}/bin/${moduleName}bar";
|
||||
defaultText = "i3bar";
|
||||
description = "Command that will be used to start a bar.";
|
||||
example = if isI3 then
|
||||
"\${pkgs.i3}/bin/i3bar -t"
|
||||
else
|
||||
"\${pkgs.waybar}/bin/waybar";
|
||||
example =
|
||||
if isI3
|
||||
then "\${pkgs.i3}/bin/i3bar -t"
|
||||
else "\${pkgs.waybar}/bin/waybar";
|
||||
};
|
||||
|
||||
statusCommand = mkNullableOption {
|
||||
|
|
@ -194,24 +209,21 @@ let
|
|||
focusedBackground = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description =
|
||||
"Background color of the bar on the currently focused monitor output.";
|
||||
description = "Background color of the bar on the currently focused monitor output.";
|
||||
example = "#000000";
|
||||
};
|
||||
|
||||
focusedStatusline = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description =
|
||||
"Text color to be used for the statusline on the currently focused monitor output.";
|
||||
description = "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;
|
||||
description =
|
||||
"Text color to be used for the separator on the currently focused monitor output.";
|
||||
description = "Text color to be used for the separator on the currently focused monitor output.";
|
||||
example = "#666666";
|
||||
};
|
||||
|
||||
|
|
@ -272,12 +284,11 @@ let
|
|||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description =
|
||||
"Border, background and text color for the binding mode indicator";
|
||||
description = "Border, background and text color for the binding mode indicator";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
description = ''
|
||||
Bar color settings. All color classes can be specified using submodules
|
||||
with 'border', 'background', 'text', fields and RGB color hex-codes as values.
|
||||
|
|
@ -291,7 +302,10 @@ let
|
|||
trayOutput = mkNullableOption {
|
||||
type = types.str;
|
||||
# Sway/Wayland doesn't have the concept of a primary output. The default for sway is to show it on all outputs
|
||||
default = if isI3 then "primary" else "*";
|
||||
default =
|
||||
if isI3
|
||||
then "primary"
|
||||
else "*";
|
||||
description = "Where to output tray.";
|
||||
};
|
||||
|
||||
|
|
@ -384,7 +398,7 @@ let
|
|||
in {
|
||||
fonts = mkOption {
|
||||
type = with types; either (listOf str) fontOptions;
|
||||
default = { };
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
names = [ "DejaVu Sans Mono" "FontAwesome5Free" ];
|
||||
|
|
@ -400,17 +414,20 @@ in {
|
|||
options = {
|
||||
titlebar = mkOption {
|
||||
type = types.bool;
|
||||
default = if versionOlder stateVersion "23.05" then
|
||||
(isI3 && (cfg.config.gaps == null))
|
||||
else
|
||||
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
|
||||
'';
|
||||
default =
|
||||
if versionOlder stateVersion "23.05"
|
||||
then (isI3 && (cfg.config.gaps == null))
|
||||
else 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
|
||||
'';
|
||||
description = "Whether to show window titlebars.";
|
||||
};
|
||||
|
||||
|
|
@ -422,31 +439,33 @@ in {
|
|||
|
||||
hideEdgeBorders = mkOption {
|
||||
type = let
|
||||
i3Options = [ "none" "vertical" "horizontal" "both" "smart" ];
|
||||
swayOptions = i3Options ++ [ "smart_no_gaps" ];
|
||||
in if isI3 then
|
||||
types.enum i3Options
|
||||
else
|
||||
types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
|
||||
i3Options = ["none" "vertical" "horizontal" "both" "smart"];
|
||||
swayOptions = i3Options ++ ["smart_no_gaps"];
|
||||
in
|
||||
if isI3
|
||||
then types.enum i3Options
|
||||
else types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
|
||||
default = "none";
|
||||
description = "Hide window borders adjacent to the screen edges.";
|
||||
};
|
||||
|
||||
commands = mkOption {
|
||||
type = types.listOf windowCommandModule;
|
||||
default = [ ];
|
||||
default = [];
|
||||
description = ''
|
||||
List of commands that should be executed on specific windows.
|
||||
See {option}`for_window` ${moduleName}wm option documentation.
|
||||
'';
|
||||
example = [{
|
||||
command = "border pixel 1";
|
||||
criteria = { class = "XTerm"; };
|
||||
}];
|
||||
example = [
|
||||
{
|
||||
command = "border pixel 1";
|
||||
criteria = {class = "XTerm";};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
description = "Window titlebar and border settings.";
|
||||
};
|
||||
|
||||
|
|
@ -455,17 +474,20 @@ in {
|
|||
options = {
|
||||
titlebar = mkOption {
|
||||
type = types.bool;
|
||||
default = if versionOlder stateVersion "23.05" then
|
||||
(isI3 && (cfg.config.gaps == null))
|
||||
else
|
||||
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
|
||||
'';
|
||||
default =
|
||||
if versionOlder stateVersion "23.05"
|
||||
then (isI3 && (cfg.config.gaps == null))
|
||||
else 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
|
||||
'';
|
||||
description = "Whether to show floating window titlebars.";
|
||||
};
|
||||
|
||||
|
|
@ -479,24 +501,22 @@ in {
|
|||
type = types.str;
|
||||
default = cfg.config.modifier;
|
||||
defaultText = "${moduleName}.config.modifier";
|
||||
description =
|
||||
"Modifier key or keys that can be used to drag floating windows.";
|
||||
description = "Modifier key or keys that can be used to drag floating windows.";
|
||||
example = "Mod4";
|
||||
};
|
||||
|
||||
criteria = mkOption {
|
||||
type = types.listOf criteriaModule;
|
||||
default = [ ];
|
||||
description =
|
||||
"List of criteria for windows that should be opened in a floating mode.";
|
||||
default = [];
|
||||
description = "List of criteria for windows that should be opened in a floating mode.";
|
||||
example = [
|
||||
{ "title" = "Steam - Update News"; }
|
||||
{ "class" = "Pavucontrol"; }
|
||||
{"title" = "Steam - Update News";}
|
||||
{"class" = "Pavucontrol";}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
description = "Floating window settings.";
|
||||
};
|
||||
|
||||
|
|
@ -504,7 +524,7 @@ in {
|
|||
type = types.submodule {
|
||||
options = {
|
||||
newWindow = mkOption {
|
||||
type = types.enum [ "smart" "urgent" "focus" "none" ];
|
||||
type = types.enum ["smart" "urgent" "focus" "none"];
|
||||
default = "smart";
|
||||
description = ''
|
||||
This option modifies focus behavior on new window activation.
|
||||
|
|
@ -515,24 +535,38 @@ in {
|
|||
};
|
||||
|
||||
followMouse = mkOption {
|
||||
type = if isSway then
|
||||
types.either (types.enum [ "yes" "no" "always" ]) types.bool
|
||||
else
|
||||
types.bool;
|
||||
default = if isSway then "yes" else true;
|
||||
type =
|
||||
if isSway
|
||||
then types.either (types.enum ["yes" "no" "always"]) types.bool
|
||||
else types.bool;
|
||||
default =
|
||||
if isSway
|
||||
then "yes"
|
||||
else true;
|
||||
description = "Whether focus should follow the mouse.";
|
||||
apply = val:
|
||||
if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val;
|
||||
if (isSway && isBool val)
|
||||
then (lib.hm.booleans.yesNo val)
|
||||
else val;
|
||||
};
|
||||
|
||||
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};
|
||||
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
|
||||
};
|
||||
description = ''
|
||||
Whether the window focus commands automatically wrap around the edge of containers.
|
||||
|
||||
|
|
@ -551,10 +585,10 @@ in {
|
|||
};
|
||||
|
||||
mouseWarping = mkOption {
|
||||
type = if isSway then
|
||||
types.oneOf [ types.bool (types.enum [ "container" "output" ]) ]
|
||||
else
|
||||
types.bool;
|
||||
type =
|
||||
if isSway
|
||||
then types.oneOf [types.bool (types.enum ["container" "output"])]
|
||||
else types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether mouse cursor should be warped to the center of the window when switching focus
|
||||
|
|
@ -563,13 +597,13 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
description = "Focus related settings.";
|
||||
};
|
||||
|
||||
assigns = mkOption {
|
||||
type = types.attrsOf (types.listOf criteriaModule);
|
||||
default = { };
|
||||
default = {};
|
||||
description = ''
|
||||
An attribute set that assigns applications to workspaces based
|
||||
on criteria.
|
||||
|
|
@ -583,14 +617,14 @@ in {
|
|||
};
|
||||
|
||||
modifier = mkOption {
|
||||
type = types.enum [ "Shift" "Control" "Mod1" "Mod2" "Mod3" "Mod4" "Mod5" ];
|
||||
type = types.enum ["Shift" "Control" "Mod1" "Mod2" "Mod3" "Mod4" "Mod5"];
|
||||
default = "Mod1";
|
||||
description = "Modifier key that is used for all default keybindings.";
|
||||
example = "Mod4";
|
||||
};
|
||||
|
||||
workspaceLayout = mkOption {
|
||||
type = types.enum [ "default" "stacking" "tabbed" ];
|
||||
type = types.enum ["default" "stacking" "tabbed"];
|
||||
default = "default";
|
||||
example = "tabbed";
|
||||
description = ''
|
||||
|
|
@ -613,12 +647,12 @@ in {
|
|||
|
||||
keycodebindings = mkOption {
|
||||
type = types.attrsOf (types.nullOr types.str);
|
||||
default = { };
|
||||
default = {};
|
||||
description = ''
|
||||
An attribute set that assigns keypress to an action using key code.
|
||||
See <https://i3wm.org/docs/userguide.html#keybindings>.
|
||||
'';
|
||||
example = { "214" = "exec /bin/script.sh"; };
|
||||
example = {"214" = "exec /bin/script.sh";};
|
||||
};
|
||||
|
||||
colors = mkOption {
|
||||
|
|
@ -700,7 +734,7 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
description = ''
|
||||
Color settings. All color classes can be specified using submodules
|
||||
with 'border', 'background', 'text', 'indicator' and 'childBorder' fields
|
||||
|
|
@ -713,50 +747,54 @@ in {
|
|||
|
||||
bars = mkOption {
|
||||
type = types.listOf barModule;
|
||||
default = if versionAtLeast stateVersion "20.09" then [{
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
fonts = {
|
||||
names = [ "monospace" ];
|
||||
size = 8.0;
|
||||
};
|
||||
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
|
||||
[ { } ];
|
||||
default =
|
||||
if versionAtLeast stateVersion "20.09"
|
||||
then [
|
||||
{
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
fonts = {
|
||||
names = ["monospace"];
|
||||
size = 8.0;
|
||||
};
|
||||
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 [{}];
|
||||
defaultText = literalExpression "see code";
|
||||
description = ''
|
||||
${capitalModuleName} bars settings blocks. Set to empty list to remove bars completely.
|
||||
|
|
@ -765,28 +803,30 @@ in {
|
|||
|
||||
startup = mkOption {
|
||||
type = types.listOf startupModule;
|
||||
default = [ ];
|
||||
default = [];
|
||||
description = ''
|
||||
Commands that should be executed at startup.
|
||||
|
||||
See <https://i3wm.org/docs/userguide.html#_automatically_starting_applications_on_i3_startup>.
|
||||
'';
|
||||
example = if isI3 then
|
||||
literalExpression ''
|
||||
[
|
||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
||||
{ command = "dropbox start"; notification = false; }
|
||||
{ command = "firefox"; }
|
||||
];
|
||||
''
|
||||
else
|
||||
literalExpression ''
|
||||
[
|
||||
{ command = "systemctl --user restart waybar"; always = true; }
|
||||
{ command = "dropbox start"; }
|
||||
{ command = "firefox"; }
|
||||
]
|
||||
'';
|
||||
example =
|
||||
if isI3
|
||||
then
|
||||
literalExpression ''
|
||||
[
|
||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
||||
{ command = "dropbox start"; notification = false; }
|
||||
{ command = "firefox"; }
|
||||
];
|
||||
''
|
||||
else
|
||||
literalExpression ''
|
||||
[
|
||||
{ command = "systemctl --user restart waybar"; always = true; }
|
||||
{ command = "dropbox start"; }
|
||||
{ command = "firefox"; }
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
gaps = mkOption {
|
||||
|
|
@ -859,7 +899,7 @@ in {
|
|||
};
|
||||
|
||||
smartBorders = mkOption {
|
||||
type = types.enum [ "on" "off" "no_gaps" ];
|
||||
type = types.enum ["on" "off" "no_gaps"];
|
||||
default = "off";
|
||||
description = ''
|
||||
This option controls whether to disable container borders on
|
||||
|
|
@ -876,17 +916,20 @@ in {
|
|||
|
||||
terminal = mkOption {
|
||||
type = types.str;
|
||||
default = if isI3 then "i3-sensible-terminal" else "${pkgs.foot}/bin/foot";
|
||||
default =
|
||||
if isI3
|
||||
then "i3-sensible-terminal"
|
||||
else "${pkgs.foot}/bin/foot";
|
||||
description = "Default terminal to run.";
|
||||
example = "alacritty";
|
||||
};
|
||||
|
||||
menu = mkOption {
|
||||
type = types.str;
|
||||
default = if isSway then
|
||||
"${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"
|
||||
else
|
||||
"${pkgs.dmenu}/bin/dmenu_run";
|
||||
default =
|
||||
if isSway
|
||||
then "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"
|
||||
else "${pkgs.dmenu}/bin/dmenu_run";
|
||||
description = "Default launcher to use.";
|
||||
example = "bemenu-run";
|
||||
};
|
||||
|
|
@ -896,7 +939,9 @@ in {
|
|||
default = null;
|
||||
description = ''
|
||||
The default workspace to show when ${
|
||||
if isSway then "sway" else "i3"
|
||||
if isSway
|
||||
then "sway"
|
||||
else "i3"
|
||||
} is launched.
|
||||
This must to correspond to the value of the keybinding of the default workspace.
|
||||
'';
|
||||
|
|
@ -904,35 +949,38 @@ in {
|
|||
};
|
||||
|
||||
workspaceOutputAssign = mkOption {
|
||||
type = with types;
|
||||
let
|
||||
workspaceOutputOpts = submodule {
|
||||
options = {
|
||||
workspace = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
example = "Web";
|
||||
description = ''
|
||||
Name of the workspace to assign.
|
||||
'';
|
||||
};
|
||||
type = with types; let
|
||||
workspaceOutputOpts = submodule {
|
||||
options = {
|
||||
workspace = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
example = "Web";
|
||||
description = ''
|
||||
Name of the workspace to assign.
|
||||
'';
|
||||
};
|
||||
|
||||
output = mkOption {
|
||||
type = with types; either str (listOf str);
|
||||
default = "";
|
||||
apply = lists.toList;
|
||||
example = "eDP";
|
||||
description = ''
|
||||
Name(s) of the output(s) from {command}`
|
||||
${if isSway then "swaymsg" else "i3-msg"} -t get_outputs
|
||||
`.
|
||||
'';
|
||||
};
|
||||
output = mkOption {
|
||||
type = with types; either str (listOf str);
|
||||
default = "";
|
||||
apply = lists.toList;
|
||||
example = "eDP";
|
||||
description = ''
|
||||
Name(s) of the output(s) from {command}`
|
||||
${
|
||||
if isSway
|
||||
then "swaymsg"
|
||||
else "i3-msg"
|
||||
} -t get_outputs
|
||||
`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
in listOf workspaceOutputOpts;
|
||||
default = [ ];
|
||||
};
|
||||
in
|
||||
listOf workspaceOutputOpts;
|
||||
default = [];
|
||||
description = "Assign workspaces to outputs.";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue