Show/Hide waybar on specific workspace
How can I only hide waybar on workspace 1. I'm using hyprland.
Or only show on workspaces that have no application.
My monitor is small so I want it has more space to display.
I don't think the former can be done with Waybar configuration, but it could be achieved using Hyprland IPC or a Hyprland plugin and their workspace event. E.g. based on the event, you could send SIGUSR1 to the waybar process.
The latter might be possible if you use the Window module. I think (but I have not tried) you could style window#waybar as hidden, and then window#waybar.empty as visible. Again though I think this could be better solved by reacting to Hyprland events via IPC.
longwasu
Friend, looking for your question I needed to run waydroid in full screen to watch movies And I managed to add a windowrule to the configuration file:
windowrule = fullscreen,^(Waydroid)$
more in : wiki
You can hide waybar on specific workspace using the following script make sure to have socat installed and to give it proper permission with sudo chmod +x waybar.sh #!/usr/bin/env bash
hidden_on_workspace=3
hide() { killall -SIGUSR1 waybar && touch /tmp/waybar_is_hidden }
show() { if [ -f /tmp/waybar_is_hidden ]; then killall -SIGUSR1 waybar && rm /tmp/waybar_is_hidden >> /dev/null 2>&1 fi }
sleep 1
current_workspace=$(hyprctl activeworkspace | awk 'match($0, /ID ([0-9]+)/, id){print id[1]}') [ $hidden_on_workspace -eq $current_workspace ] && hide
socket_path="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
if [ -z "$socket_path" ]; then echo "Error: Hyprland socket not found. Is Hyprland running?" exit 1 fi
socat -u "UNIX-CONNECT:$socket_path" STDOUT | while read -r event; do case $event in workspace>>$hidden_on_workspace ) hide ;; workspace>>* ) show ;; esac done
show
i kinda want to do this on sway, i have one portrait monitor and the bar is just too crowded on it for my tastes. I have specific workspaces bound to that monitor, anyone got tips?
oh nvm found the wiki, looks like it is easier in my case just need to define output
Old post I know, but if you find this like I did I have a solution. Set up a script to toggle each specific bar, then pkill that process individually.