mabox-compositor create picom.conf if not exist

master
Daniel Napora 2020-09-18 15:14:15 +02:00
parent a3cf9aac06
commit fce7df9f8d
1 changed files with 4 additions and 2 deletions

View File

@ -41,7 +41,7 @@ esac
# ------------- Set xcompmgr command options -----------------------------------
EXECXCOMP='picom'
#if glxinfo | egrep -iq 'direct rendering: yes'; then
#if glxinfo | grep 'direct rendering: Yes'; then
# EXECXCOMP+=' --vsync opengl'
#fi
@ -56,6 +56,8 @@ if [[ $1 = '--edit' ]]; then
terminator --command='nano "$HOME/.config/picom.conf"'
fi
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?
if ! pidof picom > /dev/null; then
$EXECXCOMP &
@ -78,7 +80,7 @@ elif [[ $1 = '--restart' ]]; then
fi
elif [[ $1 = '--watch' ]]; then
while inotifywait -e modify "$HOME/.config/picom.conf"; do
mabox-compositor --restart # TODO move this to function?
mabox-compositor --restart
done
else
# Output Openbox menu