waybar does not launch every time with exec-once
#12055
Unanswered
UtkarshVerma
asked this question in
Bugs - Other
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am facing a problem where
waybardoes not lauch reliably for me. I am pretty sure this is a race condition and I am trying to figure out what it could be. I have noticed that even with the default Hyprland config, just addingexec-once = waybardoes not launch it.I wrote a wrapper script for waybar as follows:
What I can see is Hyprland does try to launch it (it also shows up in the Hyprland logs) but the
~/waybar.logfile just turns out empty. Moreover, if I start it manually a bit later, then waybar launches instantly and~/waybar.logis populated with the logs.It also seems to work by adding a
sleep 1statement so definitely a race condition.System details
I am using the following build of Hyprland:
I launch it using
greetdandtuigreetwith the following command.My waybar config is nothing special
{ "reload_style_on_change": true, "layer": "bottom", // dmenu must be able to appear over it. "position": "top", "spacing": 0, // Let CSS specify this. "height": 37, // Fix the height so there is not layout shift. "margin": "20px 20px 0 20px", // Let Hyprland manage the bottom margin. "fixed-center": false, // This is needed for modules-right to grow as required. "modules-left": [ "hyprland/workspaces", "hyprland/window" ], "modules-right": [ // "custom/email", "custom/music", "custom/disk", "custom/memory", "custom/swap", "custom/cpu", "custom/microphone", "custom/screen-recording", "custom/audio", "custom/battery", "custom/date", "tray" ], // https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#workspaces "hyprland/workspaces": { "on-click": "activate", "format": "{icon}", // This is needed for the split-workspace plugin so that workspace // names are consistent with what is shown in the bar. "format-icons": { "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "1", "7": "2", "8": "3", "9": "4", "10": "5" }, "all-outputs": false }, "hyprland/window": { "format": "{title}", "icon": true, "icon-size": 16, "tooltip": false, "separate-outputs": true }, "custom/email": { "exec": "sb-mail", "interval": 600, "signal": 1, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-mail", "on-click-middle": "BLOCK_BUTTON=2 sb-mail", "on-click-right": "BLOCK_BUTTON=3 sb-mail", "on-scroll-up": "BLOCK_BUTTON=4 sb-mail", "on-scroll-down": "BLOCK_BUTTON=5 sb-mail" }, "custom/music": { "exec": "sb-music", "interval": "once", "signal": 2, "tooltip": false, "max-length": 50, "on-click": "BLOCK_BUTTON=1 sb-music", "on-click-middle": "BLOCK_BUTTON=2 sb-music", "on-click-right": "BLOCK_BUTTON=3 sb-music", "on-scroll-up": "BLOCK_BUTTON=4 sb-music", "on-scroll-down": "BLOCK_BUTTON=5 sb-music" }, "custom/disk": { "exec": "sb-disk", "interval": 5, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-disk", "on-click-middle": "BLOCK_BUTTON=2 sb-disk", "on-click-right": "BLOCK_BUTTON=3 sb-disk", "on-scroll-up": "BLOCK_BUTTON=4 sb-disk", "on-scroll-down": "BLOCK_BUTTON=5 sb-disk" }, "custom/memory": { "exec": "sb-memory", "interval": 1, "signal": 4, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-memory", "on-click-middle": "BLOCK_BUTTON=2 sb-memory", "on-click-right": "BLOCK_BUTTON=3 sb-memory", "on-scroll-up": "BLOCK_BUTTON=4 sb-memory", "on-scroll-down": "BLOCK_BUTTON=5 sb-memory" }, "custom/swap": { "exec": "sb-swap", "interval": 1, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-swap", "on-click-middle": "BLOCK_BUTTON=2 sb-swap", "on-click-right": "BLOCK_BUTTON=3 sb-swap", "on-scroll-up": "BLOCK_BUTTON=4 sb-swap", "on-scroll-down": "BLOCK_BUTTON=5 sb-swap" }, "custom/cpu": { "exec": "sb-loadavg", "interval": 1, "signal": 5, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-loadavg", "on-click-middle": "BLOCK_BUTTON=2 sb-loadavg", "on-click-right": "BLOCK_BUTTON=3 sb-loadavg", "on-scroll-up": "BLOCK_BUTTON=4 sb-loadavg", "on-scroll-down": "BLOCK_BUTTON=5 sb-loadavg" }, "custom/microphone": { "exec": "sb-mic", "interval": "once", "signal": 6, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-mic", "on-click-middle": "BLOCK_BUTTON=2 sb-mic", "on-click-right": "BLOCK_BUTTON=3 sb-mic", "on-scroll-up": "BLOCK_BUTTON=4 sb-mic", "on-scroll-down": "BLOCK_BUTTON=5 sb-mic" }, "custom/screen-recording": { "exec": "sb-record", "interval": "once", "signal": 7, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-record", "on-click-middle": "BLOCK_BUTTON=2 sb-record", "on-click-right": "BLOCK_BUTTON=3 sb-record", "on-scroll-up": "BLOCK_BUTTON=4 sb-record", "on-scroll-down": "BLOCK_BUTTON=5 sb-record" }, "custom/audio": { "exec": "sb-volume", "interval": "once", "signal": 8, "tooltip": false, "smooth-scrolling-threshold": 0.12, "on-click": "BLOCK_BUTTON=1 sb-volume", "on-click-middle": "BLOCK_BUTTON=2 sb-volume", "on-click-right": "BLOCK_BUTTON=3 sb-volume", "on-scroll-up": "BLOCK_BUTTON=4 sb-volume", "on-scroll-down": "BLOCK_BUTTON=5 sb-volume" }, "custom/battery": { "exec": "sb-battery", "interval": 5, "signal": 9, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-battery", "on-click-middle": "BLOCK_BUTTON=2 sb-battery", "on-click-right": "BLOCK_BUTTON=3 sb-battery", "on-scroll-up": "BLOCK_BUTTON=4 sb-battery", "on-scroll-down": "BLOCK_BUTTON=5 sb-battery" }, "custom/date": { "exec": "sb-date", "interval": 1, "signal": 10, "tooltip": false, "on-click": "BLOCK_BUTTON=1 sb-date", "on-click-middle": "BLOCK_BUTTON=2 sb-date", "on-click-right": "BLOCK_BUTTON=3 sb-date", "on-scroll-up": "BLOCK_BUTTON=4 sb-date", "on-scroll-down": "BLOCK_BUTTON=5 sb-date" }, "tray": { "icon-size": 16, "spacing": 10 } }Beta Was this translation helpful? Give feedback.
All reactions