Add picom inactive window opacity automatic toggle

Whenever i3 is using gapless mode, all windows will be opaque. When gaps
are shown inactive windows will have some transparency and blur behind
them.

Script can be invoked manually with `picom_toggle_inactive_opacity` to
toggle, `picom_toggle_inactive_opacity on` or
`picom_toggle_inactive_opacity off` to set it respectively.
This commit is contained in:
Marty Oehme 2019-11-18 22:52:25 +01:00
parent 717b9d9096
commit 3d1438f657
4 changed files with 47 additions and 14 deletions

View file

@ -90,11 +90,11 @@ for_window [class="^.*"] border pixel 0
# no gaps if there is only 1 window
smart_gaps on
# by default set some gaps when multiple windows are on the workspace
gaps inner 5
gaps inner 0
gaps outer 0
# enable / disable gaps (g disables, G enables)
bindsym $mod+shift+g gaps inner current set 5; gaps outer current set 0
bindsym $mod+g gaps inner current set 0; gaps outer current set 0
bindsym $mod+shift+g gaps inner current set 15; gaps outer current set 0; exec picom_toggle_inactive_opacity on
bindsym $mod+g gaps inner current set 0; gaps outer current set 0; exec picom_toggle_inactive_opacity off
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.