waybar: remove modules-* from defaults
Some prefer to handle modules-* imperatively for more flexibility, e.g., via waybar "includes" (https://github.com/Alexays/Waybar/wiki/Configuration). Current HM defaults modules-* to `[]` instead of null for most other settings, so they get written to ~/.config/waybar/config even though no explicit configuration has been made. And they take precedence over the imperative ones because of how waybar's includes work: ==== Paths to additional configuration files. Each file can contain a single object with any of the bar configuration options. In case of duplicate options, the first defined value takes precedence, i.e. including file -> first included file -> etc. Nested includes are permitted, but make sure to avoid circular imports. For a multi-bar config, the include directive affects only current bar configuration object. ====
This commit is contained in:
parent
8a20efbb00
commit
3d65009eff
|
@ -69,8 +69,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-left = mkOption {
|
modules-left = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed on the left.";
|
description = "Modules that will be displayed on the left.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "sway/workspaces" "sway/mode" "wlr/taskbar" ]
|
[ "sway/workspaces" "sway/mode" "wlr/taskbar" ]
|
||||||
|
@ -78,8 +78,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-center = mkOption {
|
modules-center = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed in the center.";
|
description = "Modules that will be displayed in the center.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "sway/window" ]
|
[ "sway/window" ]
|
||||||
|
@ -87,8 +87,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-right = mkOption {
|
modules-right = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed on the right.";
|
description = "Modules that will be displayed on the right.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "mpd" "custom/mymodule#with-css-id" "temperature" ]
|
[ "mpd" "custom/mymodule#with-css-id" "temperature" ]
|
||||||
|
|
|
@ -31,8 +31,6 @@ with lib;
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"test"
|
"test"
|
||||||
],
|
],
|
||||||
"modules-left": [],
|
|
||||||
"modules-right": [],
|
|
||||||
"test": {}
|
"test": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"sway/mode"
|
"sway/mode"
|
||||||
],
|
],
|
||||||
"modules-right": [],
|
|
||||||
"output": [
|
"output": [
|
||||||
"!DP-1"
|
"!DP-1"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue