Files
dotfiles/scripts/arch/toggle-waybar

12 lines
189 B
Bash
Executable File

#!/bin/sh
WAYBAR_PID=$(pgrep -x waybar)
if [ -n "$WAYBAR_PID" ]; then
# kill waybar process if it's running.
kill "$WAYBAR_PID"
else
# start waybar in the background.
waybar &
fi