This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/bin/toggle-compton

21 lines
343 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
on=""
off=""
if [[ $1 == *toggle* ]] && pgrep compton >/dev/null; then
al-compositor --stop && exit 0
elif [[ $1 == *toggle* ]]; then
al-compositor --start && exit 0
fi
while true; do
if pgrep compton >/dev/null; then
echo "$on"
else
echo "%{F#888888}$off"
fi
sleep 2
done