transsetter.sh: only apply opacity when a window is created, not every run
This commit is contained in:
parent
de6f248389
commit
5b5534d012
1 changed files with 9 additions and 6 deletions
|
@ -32,17 +32,20 @@ if ! which xshove > /dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wlist=$(mktemp)
|
wlist=$(mktemp)
|
||||||
|
oldwlist=$(mktemp)
|
||||||
while true; do
|
while true; do
|
||||||
xshove > $wlist
|
xshove > $wlist
|
||||||
while read wprop; do
|
while read wprop; do
|
||||||
wid=$(echo ${wprop} | awk '{print $1}')
|
wid=$(echo ${wprop} | awk '{print $1}')
|
||||||
|
if ! grep $wid $oldwlist > /dev/null; then
|
||||||
wclass=$(echo ${wprop} | awk '{print $3}')
|
wclass=$(echo ${wprop} | awk '{print $3}')
|
||||||
if [ "$wclass" = "${geditor}" ]; then
|
if [ "$wclass" = "${geditor}" ]; then
|
||||||
$setter -i 0x$wid ${opacity} > /dev/null
|
$setter -i 0x$wid ${opacity} > /dev/null
|
||||||
elif [ "${wclass}" = "${termprog}" ]; then
|
elif [ "${wclass}" = "${termprog}" ]; then
|
||||||
$setter -i 0x$wid ${opacity} > /dev/null
|
$setter -i 0x$wid ${opacity} > /dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done < $wlist
|
done < $wlist
|
||||||
|
cat $wlist > $oldwlist;
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue