speedwm-personal/scripts/speedwm_status

33 lines
535 B
Plaintext
Raw Normal View History

2022-10-01 22:46:40 +02:00
#!/bin/sh
# speedwm_status
# status bar manager for speedwm/stellar
2022-10-01 22:46:40 +02:00
STATUSBAR="speedwm-stellar" # should be stellar
IN_ARGS="$@" # arguments
LOADTEXT="Loading" # load text
mkdir -p $HOME/.config/speedwm/
2022-10-01 22:46:40 +02:00
# run status
rstatus() {
while true; do
$STATUSBAR $IN_ARGS > /tmp/statusbar-log
done
}
# run loop
2022-10-16 13:50:53 +02:00
statusfunc() {
if pgrep -x $STATUSBAR > /dev/null; then
clear
printf "Status bar is already running, continuing loop."
sleep 3
else
speedwm -s "$LOADTEXT"
rstatus
fi
2022-10-16 13:50:53 +02:00
statusfunc
}
2022-10-01 22:46:40 +02:00
2022-10-16 13:50:53 +02:00
statusfunc