From: Volker Schlecht Subject: wayland/waybar: default config To: ports Date: Sun, 29 Mar 2026 00:30:20 +0100 Our current default config has a typo in the sndio module, and provides example configurations that afaict don't have a change of working on OpenBSD or require additional scripts to work. Diff with an alternative proposal attached. thoughts? ok? Index: patches/patch-resources_config_jsonc =================================================================== RCS file: /cvs/ports/wayland/waybar/patches/patch-resources_config_jsonc,v retrieving revision 1.2 diff -u -p -r1.2 patch-resources_config_jsonc --- patches/patch-resources_config_jsonc 3 Mar 2026 19:18:12 -0000 1.2 +++ patches/patch-resources_config_jsonc 28 Mar 2026 23:24:26 -0000 @@ -3,17 +3,19 @@ Tweak configuration for OpenBSD Index: resources/config.jsonc --- resources/config.jsonc.orig +++ resources/config.jsonc -@@ -17,21 +17,23 @@ +@@ -16,22 +16,24 @@ + "sway/window" ], "modules-right": [ - "mpd", +- "mpd", - "idle_inhibitor", - "pulseaudio", - "network", - "power-profiles-daemon", ++ // "mpd", + // "idle_inhibitor", + // "pulseaudio", -+ "sndio", ++ "sndio", + // "network", + // "power-profiles-daemon", "cpu", @@ -27,7 +29,7 @@ Index: resources/config.jsonc "sway/language", - "battery", - "battery#bat2", -+ "upower", ++ // "upower", + // "battery", + // "battery#bat2", "clock", @@ -43,19 +45,95 @@ Index: resources/config.jsonc "tooltip-format": "{app}: {title}" }, + "sndio": { -+ "sroll-step": "10", ++ "scroll-step": "1", + "format": "  {volume}% ", -+ // "on-scroll-down": "sndioctl output.level=-0.1", -+ // "on-scroll-up": "sndioctl output.level=+0.1" ++ "on-scroll-down": "sndioctl output.level=-0.01", ++ "on-scroll-up": "sndioctl output.level=+0.01" + }, "mpd": { "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", "format-disconnected": "Disconnected ", -@@ -112,7 +120,6 @@ +@@ -112,7 +120,7 @@ }, "clock": { // "timezone": "America/New_York", - "tooltip-format": "{:%Y %B}\n{calendar}", ++ "format": "{:%H:%M}  ", "format-alt": "{:%Y-%m-%d}" }, "cpu": { +@@ -153,17 +161,6 @@ + "battery#bat2": { + "bat": "BAT2" + }, +- "power-profiles-daemon": { +- "format": "{icon}", +- "tooltip-format": "Power profile: {profile}\nDriver: {driver}", +- "tooltip": true, +- "format-icons": { +- "default": "", +- "performance": "", +- "balanced": "", +- "power-saver": "" +- } +- }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", +@@ -173,47 +170,16 @@ + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, +- "pulseaudio": { +- // "scroll-step": 1, // %, can be a float +- "format": "{volume}% {icon} {format_source}", +- "format-bluetooth": "{volume}% {icon} {format_source}", +- "format-bluetooth-muted": " {icon} {format_source}", +- "format-muted": " {format_source}", +- "format-source": "{volume}% ", +- "format-source-muted": "", +- "format-icons": { +- "headphone": "", +- "hands-free": "", +- "headset": "", +- "phone": "", +- "portable": "", +- "car": "", +- "default": ["", "", ""] +- }, +- "on-click": "pavucontrol" +- }, +- "custom/media": { +- "format": "{icon} {text}", +- "return-type": "json", +- "max-length": 40, +- "format-icons": { +- "spotify": "", +- "default": "🎜" +- }, +- "escape": true, +- "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder +- // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name +- }, + "custom/power": { + "format" : "⏻ ", +- "tooltip": false, +- "menu": "on-click", +- "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder +- "menu-actions": { +- "shutdown": "shutdown", +- "reboot": "reboot", +- "suspend": "systemctl suspend", +- "hibernate": "systemctl hibernate" +- } ++ "tooltip": false, ++ "menu": "on-click", ++ "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder ++ "menu-actions": { ++ "shutdown": "shutdown", ++ "reboot": "reboot", ++ "suspend": "systemctl suspend", ++ "hibernate": "systemctl hibernate" ++ } + } + }