diff --git a/hosts/common/programs/nwg-panel/config b/hosts/common/programs/nwg-panel/config index 135539b0..0376b9dc 100644 --- a/hosts/common/programs/nwg-panel/config +++ b/hosts/common/programs/nwg-panel/config @@ -95,18 +95,7 @@ "angle": 0.0 }, "sway-workspaces": { - "numbers": [ - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10" - ], + "numbers": @workspaceNumbers, "custom-labels": [], "focused-labels": [], "show-icon": @windowIcon@, @@ -115,7 +104,7 @@ "name-length": 40, "mark-autotiling": true, "mark-content": false, - "hide-empty": true, + "hide-empty": @workspaceHideEmpty@, "show-layout": false, "angle": 0.0 }, diff --git a/hosts/common/programs/nwg-panel/default.nix b/hosts/common/programs/nwg-panel/default.nix index 5d83d77d..bf205fdd 100644 --- a/hosts/common/programs/nwg-panel/default.nix +++ b/hosts/common/programs/nwg-panel/default.nix @@ -33,6 +33,20 @@ in mediaPrevNext = mkEnableOption' true "display prev/next button in media"; windowIcon = mkEnableOption' true "display icon of active window"; windowTitle = mkEnableOption' true "display title of active window"; + workspaceNumbers = mkOption { + type = types.listOf types.str; + default = [ + # TODO: workspace 10 should be rendered as "TV" + "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" + ]; + description = '' + workspaces to monitor + ''; + }; + workspaceHideEmpty = mkOption { + type = types.bool; + default = true; + }; }; }; }; @@ -47,8 +61,9 @@ in # fs.".config/nwg-panel/style.css".symlink.target = ./style.css; fs.".config/nwg-panel/config".symlink.target = pkgs.substituteAll { src = ./config; - inherit (cfg.config) height windowIcon windowTitle; + inherit (cfg.config) height windowIcon windowTitle workspaceHideEmpty; playerctlChars = if cfg.config.mediaTitle then 30 else 0; + workspaceNumbers = builtins.toJSON cfg.config.workspaceNumbers; }; fs.".config/nwg-panel/style.css".symlink.target = pkgs.substituteAll { src = ./style.css; diff --git a/hosts/modules/roles/handheld.nix b/hosts/modules/roles/handheld.nix index 53ebf8d8..93b8217f 100644 --- a/hosts/modules/roles/handheld.nix +++ b/hosts/modules/roles/handheld.nix @@ -63,6 +63,8 @@ windowTitle = false; mediaPrevNext = false; mediaTitle = false; + workspaceNumbers = [ "1" "2" "3" "4" "5" ]; + workspaceHideEmpty = false; }; sane.programs.zsh.config.showDeadlines = false; # unlikely to act on them when in shell