script: refactor change-colortheme

This commit is contained in:
2025-10-18 02:50:22 +02:00
parent f7fe2b00b5
commit 6f8b7431f9
49 changed files with 360 additions and 1668 deletions

View File

@@ -15,7 +15,7 @@ function close() {
function open() {
# the system tray will not work with kded6 started
if killall -q -9 "kded6"; then
while pgrep -x "kded6" >/dev/null; do
while pgrep -u "$USER" -x "kded6" >/dev/null; do
sleep 0.2
done
fi
@@ -29,13 +29,13 @@ function open() {
if [ "$1" = "restart" ]; then
close
while pgrep -x "waybar" >/dev/null; do
while pgrep -u "$USER" -x "waybar" >/dev/null; do
sleep 0.2
done
open
elif pgrep -x "waybar" >/dev/null; then
elif pgrep -u "$USER" -x "waybar" >/dev/null; then
close
elif ! pgrep -x "waybar" >/dev/null; then
elif ! pgrep -u "$USER" -x "waybar" >/dev/null; then
open
else
echo "Usage: $0 [restart]"