From f37014a856c8b8595756587e894be039bfd7b343 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 15 Jun 2024 22:50:01 +0000 Subject: [PATCH] nwg-panel: minor tweaks & simplifications --- hosts/common/programs/nwg-panel/config.nix | 61 ++++++++++------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/hosts/common/programs/nwg-panel/config.nix b/hosts/common/programs/nwg-panel/config.nix index cab30384..5891c3aa 100644 --- a/hosts/common/programs/nwg-panel/config.nix +++ b/hosts/common/programs/nwg-panel/config.nix @@ -1,3 +1,18 @@ +# TODO: +# - declare a *separate* panel for each external display i expect to connect to (e.g. on desko). +# - unless is merged, +# i think it isn't possible to deploy one panel to *every* display. +# - but i think it is possible to declare multiple panels below, +# and nwg-panel should deploy all of them? +# - or try +# - try this PR to get custom workspace names to work: +# - +# - add network/bluetooth indicator +# - +# - add CPU/meminfo executor +# - use sane-sysinfo +# - fix swaync icon +# - disable the brightness icon from bar { components, height, @@ -22,7 +37,7 @@ menu-start = "off"; name = "panel-top"; # TODO: display on all outputs? or at least ensure the primary output, on e.g. desko - output = ""; + output = "All"; #< TODO: untested. see padding-horizontal = 0; padding-vertical = 0; position = "top"; @@ -54,7 +69,7 @@ calendar-placement = "top"; css-name = "clock"; format = "%H:%M"; - interval = 1; #< TODO: safe to use a longer interval? + interval = 30; on-left-click = ""; on-middle-click = ""; on-right-click = ""; @@ -65,7 +80,9 @@ tooltip-text = "%a; %d %b %H:%M:%S"; }; controls-settings = { - commands.battery = ""; + battery-low-interval = 4; #< notify every N minutes when battery continues to remain low + battery-low-level = 15; #< notify if battery is lower than this percent + # commands.battery = ""; #< optional action to perform when battery icon is clicked in the drop-down menu components = components; click-closes = false; custom-items = []; @@ -95,7 +112,13 @@ } ]; menu.name = "Exit"; + output-switcher = true; #< allow changing the default audio sink + #v `show-` means "show the NUMERICAL VALUE corresponding to " + # e.g. show-battery means "show the battery _percentage_ next to its icon". + show-battery = true; + show-brightness = false; show-values = false; + show-volume = false; # window-width: should be 360 for moby, but because of weird `margin` tweaks in style.css # we have to add 20px to both sides window-width = 400; @@ -109,32 +132,6 @@ label-css-name = "playerctl-label"; scroll = false; }; - # TODO: sway-taskbar is unused? - sway-taskbar = { - all-outputs = true; - all-workspaces = true; - angle = 0.0; - image-size = 16; - mark-autotiling = true; - mark-xwayland = false; - name-max-len = 20; - show-app-icon = windowIcon; - show-app-name = windowTitle; - show-layout = false; - task-padding = 0; - workspace-buttons = false; - workspace-menu = [ - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - ]; - workspaces-spacing = 0; - }; sway-workspaces = { angle = 0.0; custom-labels = []; @@ -149,10 +146,6 @@ show-layout = false; show-name = windowTitle; }; - tray = { - inner-css-name = "inner-tray"; - root-css-name = "tray"; - }; # unused modules: brightness-slider = {}; @@ -163,6 +156,8 @@ openweather = {}; scratchpad = {}; sway-mode = {}; + sway-taskbar = {}; #< windows-style taskbar, usually placed at the bottom of the screen, to show open windows & tab to them on click + tray = {}; } ]