Files
dwmstatus/dwmstatus-restart
Christoph Lohmann 384bee02ea Add comment about xinitrc logic. Do double fork.
Thanks eidolon for the hint.
2023-08-24 11:13:09 +02:00

24 lines
415 B
Bash
Executable File

#!/bin/sh
if pgrep -x dwmstatus 2>&1 >/dev/null;
then
printf "Killing old dwmstatus instances ... "
pkill -KILL -x dwmstatus
printf "done.\n"
fi
if [ -e $HOME/.xinitrc ];
then
# In case some .xinitrc exists, do try to run dwmstatus as people
# run it in their .xinitrc. This is in case some error
# redirection is done or logging.
{
grep dwmstatus $HOME/.xinitrc | sh
} &
else
{
dwmstatus &
} &
fi