...
Before you can use my py3status config file, you'll need to install font-awesome fonts (4.7) - I had issues with version 5, but works well with v4:
Code Block | ||
---|---|---|
| ||
yaourtyay -S ttf-font-awesome-4 |
Below is my config file, which looks like this:
...
Resulting alttab
settings that match my theme:
Dim non-active windows instead of applying transparency (and implement per window dim enable/disable shortcuts)
I prefer visual identification of non-active windows by dimming rather than transparency. By default, Manjaro i3 uses a non-active window transparency as a way to help visually identify active/non-active windows. This works quite well, but I find this adds to the "visual noise" in a busy i3 session.
The following approach replaces the default inactive window transparency with compton dim rules. We'll also cover how modify dimming on a per window basis via a keyboard shortcuts (occasionally want to disable the default dimming on a window by window basis).
First, let's disable compton's inactive-opacity
setting. Your opacity settings in compton.conf should look something like this:
Code Block |
---|
# opacity settings
menu-opacity = 0.95;
#inactive-opacity = 0.93;
active-opacity = 1;
alpha-step = 0.01;
opacity-rule = [
"90:name = 'alttab'",
"80:class_g = 'copyq'",
"99:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
]; |
You'll note that we've disabled inactive-opacity
and set active-opacity
to 1
. We've also kept a few opacity=rule
rules that I want to still apply to several window types. Note the last rule above - it simply disables transparency for sticky windows (another i3 concept which allows to keep a window showing/pinned on all workspaces).
Now, let's setup default dim settings. We'll do so by adding the following settings:
Code Block |
---|
# dim settings
inactive-dim = 0.2;
# exclude treats as always focused (doesn't dim)
focus-exclude = [
"ANTIDIM_FLAG@:8c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'",
"class_g = 'Cairo-clock'"
]; |
Note the focus-exclude
rule array. This defines rules for NOT applying dim on window types.
Notice the rule ANTIDIM_FLAG@:8c
, we'll use this to NOT applying dimming by window property (which we'll apply to selected windows via an i3 keyboard shortcut).
We can apply arbitrary window properties on selected windows. Compton will respect these rules (by property). The ANTIDIM_FLAG@:8c
rules above (in the focus-exclude
array is an example of this). To apply/remove this window property on a selected window add the following bindsyms to your i3.conf
:
Code Block |
---|
# 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' |
Info |
---|
For the above shortcuts to work, you'll need to install |
The above shortcuts will enable the ANTIDIM
property for the currently selected window (which will disable dimming on said window) or disable the ANTIDIM property (which will then respect the default dim settings defined above).
For reference here is my ~/.config/compton.conf
View Git file | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Enabling per window transparency with transset-df (and keybind changing it)
...