The current Waybar toggle only kills the process and will not reopen Waybar when pressed again. I created this script to check weither Waybar is active and either kill or start the process. I image there are more checks that should get done, but this works well enough for my needs.
Modification to Keybind in /config/Keybinds.config
#!/bin/bash
if pgrep -x "waybar" > /dev/null
then
# Waybar is running. Let's close it.
pkill waybar
else
# Waybar is NOT running, Let's start it in the background.
waybar &
fi
Feature Request
Hello!
The current Waybar toggle only kills the process and will not reopen Waybar when pressed again. I created this script to check weither Waybar is active and either kill or start the process. I image there are more checks that should get done, but this works well enough for my needs.
Modification to Keybind in /config/Keybinds.config
bind = $mainMod, B, exec, $scriptsDir/WaybarToggle.sh # Toggle hide/show waybar
WaybarToggle.sh