diff --git a/usr/bin/mabox-compositor b/usr/bin/mabox-compositor index 2ac85f2..284fdff 100755 --- a/usr/bin/mabox-compositor +++ b/usr/bin/mabox-compositor @@ -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