diff --git a/toggle-bw.sh b/toggle-bw.sh index 0a276a3..1523c21 100755 --- a/toggle-bw.sh +++ b/toggle-bw.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +PICOM_OPTIONS="--backend glx" + # pgrep returns 0 if a matching process is found, 1 if not. # Thus 1 means there is either a picom process without b/w filter running, # or none at all. Either way, display is coloured when return code is 1. @@ -7,7 +9,7 @@ pgrep -fa gl_FragColor &>/dev/null if [ $? -eq 1 ]; then pkill picom - picom --backend glx --glx-fshader-win \ + picom ${PICOM_OPTIONS} --glx-fshader-win \ "uniform sampler2D tex; uniform float opacity; void main() { @@ -16,5 +18,5 @@ then }" & else pkill picom - picom & + picom ${PICOM_OPTIONS} & fi