Last active
November 28, 2018 21:30
-
-
Save Cybolic/ac300c78b9f98d43f28e85a9e90f4650 to your computer and use it in GitHub Desktop.
This script makes opaque all windows that are currently completely transparent. Compton sometimes sets the transparency of windows to zero, so this helps get out of when this happens.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
WINDOW_IDS=$(xwininfo -root -tree | grep -v '("i3-frame"' | grep -oP '(?:[[:space:]]+)(0x[[:alnum:]]+)(?= ".*?":)') | |
for w_id in $WINDOW_IDS; do | |
w_prop="$(xprop -id $w_id)" | |
if (echo "$w_prop" | grep '_NET_WM_WINDOW_OPACITY' | grep ' = 0') &>/dev/null; then | |
xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY "0xffffffff" -id $w_id | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upon further testing, the following addition to compton.conf seems to fix the issue:
Using
active-opacity
orinactive-opacity
on their own doesn't make a difference and using the latest i3-gaps doesn't fix it either but the above works for me.