diff --git a/.config/i3/config b/.config/i3/config index a7a326e..fb695b3 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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. diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index 482ac09..e9146e6 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -105,25 +105,31 @@ shadow-ignore-shaped = false; # ################################# -inactive-opacity = 1; -active-opacity = 1; +inactive-opacity = 0.8; +active-opacity = 0.9; frame-opacity = 1; -inactive-opacity-override = false; +inactive-opacity-override = true; # Dim inactive windows. (0.0 - 1.0) #inactive-dim = 0.1; # Do not let dimness adjust based on window opacity. # inactive-dim-fixed = true; # Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. -blur-background = false; +# blur-background = true; # Blur background of opaque windows with transparent frames as well. -blur-background-frame = false; +# blur-background-frame = false; # Do not let blur radius adjust based on window opacity. -blur-background-fixed = true; -blur-background-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'" -]; +# blur-background-fixed = true; +# blur-background-exclude = [ + # "window_type = 'dock'", + # "window_type = 'desktop'" +# ]; +blur: +{ + method = "gaussian"; + size = 10; + deviation = 5.0; +}; ################################# # diff --git a/.local/bin/picom_toggle_inactive_opacity b/.local/bin/picom_toggle_inactive_opacity new file mode 100755 index 0000000..e1c656e --- /dev/null +++ b/.local/bin/picom_toggle_inactive_opacity @@ -0,0 +1,27 @@ +#!/bin/bash +# toggle the translucency of inactive windows in the picom compositor +# by substituting the true/false setting in the picom config file. +# picom will automatically reload its settings on any config file changes. +# +# scipt can be called without arguments to toggle the value; +# or with on / off to set it to translucent / opaque, respectively. + +piconf="$XDG_CONFIG_HOME"/picom/picom.conf + +line=$(grep -n "inactive-opacity-override" "$piconf") + +IFS=: read -r line text < <(grep -n "inactive-opacity-override" "$piconf") + +_replace() { # line file old new + sed -i "$1 s/$3/$4/" "$2" +} + +if [ "$1" = "off" ]; then + _replace "$line" "$piconf" "true" "false" +elif [ "$1" = "on" ]; then + _replace "$line" "$piconf" "false" "true" +elif echo "$text" | grep -q "true"; then + _replace "$line" "$piconf" "true" "false" +elif echo "$text" | grep -q "false"; then + _replace "$line" "$piconf" "false" "true" +fi diff --git a/.xinitrc b/.xinitrc index 97be0a4..e9e1c00 100644 --- a/.xinitrc +++ b/.xinitrc @@ -54,7 +54,7 @@ type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape' # if unclutter exists start it type unclutter >/dev/null 2>&1 && unclutter & # if picom exists then we can start it as our compositor -type picom >/dev/null 2>&1 && picom & +type picom >/dev/null 2>&1 && picom --experimental-backends & # same deal with flashfocus as our active window indicator type flashfocus >/dev/null 2>&1 && flashfocus -l never & # if redshift is installed run it