fix compositor restart
This commit is contained in:
parent
31b814557d
commit
e4bdd363f6
@ -39,6 +39,7 @@ elif [[ $1 = '--toggle' || $1 = '--start' ]]; then # Toggle compositing with com
|
|||||||
killall compton
|
killall compton
|
||||||
fi
|
fi
|
||||||
elif [[ $1 = '--restart' ]]; then
|
elif [[ $1 = '--restart' ]]; then
|
||||||
|
if pidof compton > /dev/null;then
|
||||||
killall -q compton
|
killall -q compton
|
||||||
for (( i=0; i < RESTART_ATTEMPTS; i++ )); do
|
for (( i=0; i < RESTART_ATTEMPTS; i++ )); do
|
||||||
pidof compton > /dev/null || # no process found! Safe to start again
|
pidof compton > /dev/null || # no process found! Safe to start again
|
||||||
@ -50,6 +51,7 @@ elif [[ $1 = '--restart' ]]; then
|
|||||||
sleep 0.25
|
sleep 0.25
|
||||||
done
|
done
|
||||||
mabox-compositor --start
|
mabox-compositor --start
|
||||||
|
fi
|
||||||
elif [[ $1 = '--watch' ]]; then
|
elif [[ $1 = '--watch' ]]; then
|
||||||
while inotifywait -e modify "$HOME/.config/compton.conf"; do
|
while inotifywait -e modify "$HOME/.config/compton.conf"; do
|
||||||
mabox-compositor --restart # TODO move this to function?
|
mabox-compositor --restart # TODO move this to function?
|
||||||
|
Loading…
Reference in New Issue
Block a user