This commit is contained in:
2025-07-29 01:29:28 +02:00
parent 299e5aa5de
commit 6d49a475b1
19 changed files with 673 additions and 585 deletions

View File

@@ -1,12 +1,7 @@
#!/bin/env bash
function close() {
if pgrep -x "waybar" > /dev/null; then
killall -q waybar
# Wait until the processes have been shut down
while pgrep -x waybar >/dev/null; do sleep 1; done
fi
killall -q waybar
# Also close the lyrics widget if open
if eww active-windows | grep -q "lyrics-single"; then
@@ -15,23 +10,32 @@ function close() {
}
function open() {
# the system tray will not work with kded6 started
if killall -q "kded6"; then
while pgrep -x "kded6" >/dev/null; do
sleep 0.2
done
fi
waybar &
}
if [ -z "$1" ]; then
close
while pgrep -x "waybar" >/dev/null; do
sleep 0.2
done
open
elif [ "$1" = "close" ]; then
if ! pgrep -x "waybar" > /dev/null; then
if ! pgrep -x "waybar" >/dev/null; then
exit 1
fi
close
elif [ "$1" = "open" ]; then
if pgrep -x "waybar" > /dev/null; then
if pgrep -x "waybar" >/dev/null; then
exit 1
fi
open
else
echo "Usage: $0 [close|open]"
exit 1
fi
fi