speedwm-personal/scripts/speedwm_status
speediegq 122fc050bb Add module system (will add more of these modules tomorrow, add support
for statuscmd to stellar, add more modules to mouse.h
2022-10-08 02:31:35 +02:00

20 lines
478 B
Bash
Executable file

#!/bin/sh
# speedwm_status
# status bar manager
STATUSBAR=$(cat /usr/share/speedwm/statusbar)
STATUSBAR2=$(grep speedwm.status: $HOME/.config/speedwm-de/speedwmrc | awk '{ print $2 }')
IN_ARGS="$@"
BUTTON="$BUTTON"
echo $BUTTON > /tmp/button
# check if the two values are the same, if not then we use the rc config
if [ "$STATUSBAR" != "$STATUSBAR2" ]; then
STATUSBAR="$STATUSBAR2"
fi
pgrep -x $STATUSBAR || $STATUSBAR $IN_ARGS > /tmp/statusbar-log &
sleep 3
$0 && exit 0