Commit 29c2b54f authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Setting custom x11 property on windows to disable dimming (anti-dim) on active...

Setting custom x11 property on windows to disable dimming (anti-dim) on active window with mod+Mod1+a for anti-dim model and mod+Mod1+d for dim mode.
parent c5717742
...@@ -70,6 +70,7 @@ opacity-rule = [ ...@@ -70,6 +70,7 @@ opacity-rule = [
inactive-dim = 0.2; inactive-dim = 0.2;
# exclude treats as always focused (doesn't dim) # exclude treats as always focused (doesn't dim)
focus-exclude = [ focus-exclude = [
"ANTIDIM_FLAG@:8c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'",
"class_g = 'Cairo-clock'" "class_g = 'Cairo-clock'"
]; ];
......
...@@ -203,6 +203,10 @@ bindsym $mod+Mod1+Shift+x exec transset-df -a --inc 0.1 --max 0.99 ...@@ -203,6 +203,10 @@ bindsym $mod+Mod1+Shift+x exec transset-df -a --inc 0.1 --max 0.99
bindsym $mod+Mod1+Ctrl+x exec "WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) \\"\\" 2>/dev/null); for window in $WINDOWS; do xdotool windowactivate $window; transset-df -a --inc 0.20 --max 0.99; done" bindsym $mod+Mod1+Ctrl+x exec "WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) \\"\\" 2>/dev/null); for window in $WINDOWS; do xdotool windowactivate $window; transset-df -a --inc 0.20 --max 0.99; done"
bindsym $mod+Mod1+c exec --no-startup-id "pkill compton; compton -b" bindsym $mod+Mod1+c exec --no-startup-id "pkill compton; compton -b"
# window dimming enable or disable (uses xdotool and xprop to set a anti-dim flag, which compton recognises in focus-exclude array)
bindsym $mod+Mod1+a exec xprop -id $(xdotool getactivewindow) -f ANTIDIM_FLAG 8c -set ANTIDIM_FLAG 1; exec notify-send 'anti-dim set on window'
bindsym $mod+Mod1+d exec xprop -id $(xdotool getactivewindow) -remove ANTIDIM_FLAG; exec notify-send 'dim set on window'
# focus the parent container # focus the parent container
bindsym $mod+a focus parent bindsym $mod+a focus parent
bindsym $mod+Shift+a focus child bindsym $mod+Shift+a focus child
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment