support common picom options

This commit is contained in:
chris 2020-10-12 14:30:12 +02:00
parent c2b8a0b8fe
commit 4165da3984
1 changed files with 4 additions and 2 deletions

View File

@ -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