2020-11-08 16:26:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
echo stop
|
|
|
|
killall -q picom || true
|
|
|
|
while pgrep -x picom >/dev/null; do sleep 1; done
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
echo start
|
|
|
|
picom -b --experimental-backends \
|
2021-02-25 02:34:40 +00:00
|
|
|
--blur-method dual_kawase --blur-strength 7 --blur-size 15 \
|
2020-11-08 16:26:14 +00:00
|
|
|
--no-fading-openclose
|
|
|
|
sleep 1
|
|
|
|
! pgrep -x picom >/dev/null && echo 'fallback' && picom -b --no-fading-openclose
|
|
|
|
}
|
|
|
|
|
|
|
|
toggle() {
|
|
|
|
if pgrep -x picom > /dev/null; then
|
|
|
|
stop
|
|
|
|
else
|
|
|
|
start
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
toggle)
|
|
|
|
toggle
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
esac
|