From 4165da3984a5cb30a588287e226b74a52b5bcbb7 Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 12 Oct 2020 14:30:12 +0200 Subject: [PATCH] support common picom options --- toggle-bw.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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