Add comment about xinitrc logic. Do double fork. - dwmstatus - A simple dwm status application in C.
(HTM) git clone git://git.suckless.org/dwmstatus
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 384bee02eac5cc189ed382f621bb8151a4e9872b
(DIR) parent 81cdc8f4a2528374842049c214937349b30fbebc
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Thu, 24 Aug 2023 11:13:09 +0200
Add comment about xinitrc logic. Do double fork.
Thanks eidolon for the hint.
Diffstat:
M dwmstatus-restart | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/dwmstatus-restart b/dwmstatus-restart
@@ -9,8 +9,15 @@ fi
if [ -e $HOME/.xinitrc ];
then
- cat $HOME/.xinitrc | grep dwmstatus | sh
+ # 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 &
+ {
+ dwmstatus &
+ } &
fi