diff --git a/.env b/.env index 5bcd3fd..311e665 100644 --- a/.env +++ b/.env @@ -20,3 +20,4 @@ WITH_LAZYGIT_CONFIG=yes WITH_ROFI_CONFIG=yes WITH_ALACRITTY_CONFIG=yes WITH_TMUX_CONFIG=yes +WITH_PICOM_CONFIG=yes diff --git a/configs/picom/picom.conf b/configs/picom/picom.conf new file mode 100644 index 0000000..e973b21 --- /dev/null +++ b/configs/picom/picom.conf @@ -0,0 +1,181 @@ +# Performance and behaviour related +# Settings for glx backend +backend = "glx"; +glx-no-stencil = false; +glx-copy-from-front = false; +use-damage = true; +# refresh-rate = 0; +# vsync = "opengl-swc"; +dbe = false; +sw-opti = false; + +# Settings for xrender backend +# backend = "xrender"; +# vsync = false; +# refresh-rate = 0; +# xrender-sync-fence = true; + +unredir-if-possible = true; +detect-transient = true; +detect-client-leader = true; + +# These might or might NOT help with performance +# glx-no-stencil = true; +# glx-copy-from-front = false; # When enbled on intel GPU: screen broken until compton is killed. +# glx-use-copysubbuffermesa = true +# glx-no-rebind-pixmap = false +# glx-swap-method = 1 + +opacity-rule = [ + #"60:class_g ?= 'rofi'", + # i3 titlebar transparency + #"60:class_g = 'i3-frame'" + # For i3wm tabbed/stacked layout transparency + #"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + # herbstluftwm frame + #"60:class_g = '_HERBST_FRAME'" +]; + +focus-exclude = [ + #"class_g ?= 'rofi'" + #'_NET_WM_NAME@:s = "rofi"' + "class_g ?= 'slop'", + "name = 'rofi'", + "class_g ?= 'Steam'", + "_NET_WM_WINDOW_TYPE@:a *= 'MENU'", + "window_type *= 'menu'", + "window_type = 'utility'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'" +]; + +# === Shadows === +# Enabled client-side shadows on windows. +shadow = true; +# Detect rounded corners +# (it doesn't really do anything for shadows) +detect-rounded-corners = true; + +# Shadow color +# shadow-red = 1 +# shadow-green = 0.2 +# shadow-blue = 0.45 + +# shadow-radius: The blur radius for shadows. (default 12) +# shadow-offset-x: The left offset for shadows. (default -15) +# shadow-offset-y: The top offset for shadows. (default -15) +# shadow-opacity: The translucency for shadows. (default .75) + +shadow-radius = 40; +shadow-offset-x = -20; +shadow-offset-y = -20; +shadow-opacity = 0.3; + +shadow-exclude = [ + "class_i ?= 'riotclientservices.exe'", + "class_g ?= 'slop'", + "class_g ?= 'Polybar'", + "class_g ?= 'Visualizer'", + # "class_g ?= 'rofi'", + # i3wm titlebar shadows (tabbed/stacked) + "class_g ?= 'i3-frame'", + # i3wm hidden window shadows (tabbed/stacked) + # "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + "_NET_WM_WINDOW_TYPE@:a *= 'SPLASH'", + # "_NET_WM_WINDOW_TYPE@:a *= 'NOTIFICATION'", + "window_type *= 'menu'", + "window_type = 'utility'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'" +]; + +# === Transparency === +# active-opacity = 0.95 +# inactive-opacity = 0.95 +# inactive-dim = 0.10 + +# Border and titlebar opacity +# frame-opacity = 0.4; + +# === Fading === +# Fade windows during opacity changes. +fading = true; +# The time between steps in a fade in milliseconds. (default 10). +fade-delta = 5; +# fade-delta = 3; +# Opacity change between steps while fading in. (default 0.028). +fade-in-step = 0.03; +# Opacity change between steps while fading out. (default 0.03). +fade-out-step = 0.03; +# Fade windows in/out when opening/closing +no-fading-openclose = false; + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ + # "name = '???'", + # "width >= 3440", + # "fullscreen" + # Only fade AwesomeWM wiboxes + # (Notice the inverse condition) + "class_g != 'awesome'" +]; + +# === Blurring === +blur-background = true; +blur-method = "kawase"; +# blur-method = "convolution"; +blur-strength = 7; +blur-background-fixed = true; +# Blur background of opaque windows with transparent frames as well. +# blur-background-frame = true; +# Predefined +# blur-kern = "3x3box" +# blur-kern = "3x3gaussian" +# blur-kern = "5x5box" +# blur-kern = "5x5gaussian" +# blur-kern = "7x7box" +# blur-kern = "7x7gaussian" +# blur-kern = "9x9gaussian" +# blur-kern = "11x11gaussian" +# Strong-ish blur +# blur-kern = "7,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" +# Medium blur +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" +# Weak blur +# blur-kern = "3,3,1,1,1,1,1,1,1,1" + +blur-background-exclude = [ + # Exclude everything except windows of type "splash" + # (Notice the inverse condition) + "window_type != 'splash'" +]; + + +# >> Rounded corners +corner-radius = 8 +# For HiDPI +# corner-radius = 18 + +rounded-corners-exclude = [ + # "_NET_WM_WINDOW_TYPE@:a *= 'NOTIFICATION'", + "window_type *= 'dock'", + # "class_g = 'awesome'", + "class_g = 'Tint2'", + "window_type = 'menu'", + "window_type = 'tooltip'", + "window_type = 'popup_menu'", + "window_type = 'dropdown_menu'" +]; + +# Window type settings +wintypes: +{ + tooltip = { fade = true; shadow = false; }; + menu = { shadow = false; }; + dnd = { shadow = false; }; + dock = { shadow = false; }; + dropdown_menu = { shadow = false; }; + popup_menu = { shadow = false; }; + utility = { shadow = false; }; +}; + diff --git a/install.sh b/install.sh index 323665b..08d2dce 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,7 @@ find ./scripts -type f -iname "*.sh" -exec chmod +x {} \; ./scripts/tools/rofi/install.sh ./scripts/tools/alacritty/install.sh ./scripts/tools/tmux/install.sh +./scripts/tools/picom/install.sh ./scripts/window_manager/awesome/install.sh ./scripts/window_manager/i3/install.sh ./scripts/tools/fonts/install.sh diff --git a/scripts/tools/picom/install.sh b/scripts/tools/picom/install.sh new file mode 100755 index 0000000..b6ec779 --- /dev/null +++ b/scripts/tools/picom/install.sh @@ -0,0 +1,14 @@ +source ./scripts/common.sh + +if [[ "$WITH_PICOM_CONFIG" == 'yes' || "$WITH_PICOM_CONFIG" == 'force' ]]; then + if [[ -d "$HOME/.config/picom" && "$WITH_PICOM_CONFIG" == 'force' ]]; then + rm -rf "$HOME/.config/picom" + echo '[INFO] Picom config removed | Forced by environment variable' + fi + if [[ ! -d "$HOME/.config/picom" ]]; then + ln -s "$CWD/configs/picom" "$HOME/.config/picom" + echo "[INFO] Picom config linked with symbolic link : $CWD/configs/picom -> $HOME/.config/picom" + else + echo '[INFO] Picom config already linked' + fi +fi