dotfiles/.scripts/decop.sh

12 lines
310 B
Bash
Executable File

#!/bin/zsh
if [ -e /tmp/compton.lock ]
then
echo locked
else
touch /tmp/compton.lock
awk -F= '{if($1 == "shadow-opacity " && $2+0.0 < 1) {$2=$2+0.1;$2 = $2 ";";}}1' OFS="= " ~/.compton.conf > /tmp/compton.conf
cat /tmp/compton.conf > ~/.compton.conf
kill -SIGUSR1 `pidof compton`
rm /tmp/compton.lock
fi