mabox-compositor create picom.conf if not exist
parent
a3cf9aac06
commit
fce7df9f8d
|
@ -41,7 +41,7 @@ esac
|
||||||
|
|
||||||
# ------------- Set xcompmgr command options -----------------------------------
|
# ------------- Set xcompmgr command options -----------------------------------
|
||||||
EXECXCOMP='picom'
|
EXECXCOMP='picom'
|
||||||
#if glxinfo | egrep -iq 'direct rendering: yes'; then
|
#if glxinfo | grep 'direct rendering: Yes'; then
|
||||||
# EXECXCOMP+=' --vsync opengl'
|
# EXECXCOMP+=' --vsync opengl'
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ if [[ $1 = '--edit' ]]; then
|
||||||
terminator --command='nano "$HOME/.config/picom.conf"'
|
terminator --command='nano "$HOME/.config/picom.conf"'
|
||||||
fi
|
fi
|
||||||
elif [[ $1 = '--toggle' || $1 = '--start' ]]; then # Toggle compositing with picom.
|
elif [[ $1 = '--toggle' || $1 = '--start' ]]; then # Toggle compositing with picom.
|
||||||
|
[[ ! -f $HOME/.config/picom.conf ]] &&
|
||||||
|
cp '/etc/xdg/picom.conf' "$HOME/.config/picom.conf"
|
||||||
# TODO why --toggle and --start act exactly the same?
|
# TODO why --toggle and --start act exactly the same?
|
||||||
if ! pidof picom > /dev/null; then
|
if ! pidof picom > /dev/null; then
|
||||||
$EXECXCOMP &
|
$EXECXCOMP &
|
||||||
|
@ -78,7 +80,7 @@ elif [[ $1 = '--restart' ]]; then
|
||||||
fi
|
fi
|
||||||
elif [[ $1 = '--watch' ]]; then
|
elif [[ $1 = '--watch' ]]; then
|
||||||
while inotifywait -e modify "$HOME/.config/picom.conf"; do
|
while inotifywait -e modify "$HOME/.config/picom.conf"; do
|
||||||
mabox-compositor --restart # TODO move this to function?
|
mabox-compositor --restart
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
# Output Openbox menu
|
# Output Openbox menu
|
||||||
|
|
Loading…
Reference in New Issue