diff --git a/dots/config/bspwm/picom-animations.conf b/dots/config/bspwm/picom-animations.conf new file mode 100644 index 00000000..2c97a948 --- /dev/null +++ b/dots/config/bspwm/picom-animations.conf @@ -0,0 +1,75 @@ +# The animations only works for NORMAL windows. +# Dropdowns, popups, tooltips, docks, etc., do not have animations. + +{ + match = "window_type = 'normal'"; + animations = ( + { + triggers = ["close", "hide"]; + opacity = { + curve = "linear"; + duration = 0.1; + start = "window-raw-opacity-before"; + end = 0; + }; + # blur-opacity = "opacity"; + shadow-opacity = "opacity"; + }, + { + triggers = ["open", "show"]; + opacity = { + curve = "cubic-bezier(0,1,1,1)"; + duration = 0.5; + start = 0; + end = "window-raw-opacity"; + }; + # blur-opacity = "opacity"; + shadow-opacity = "opacity"; + offset-x = "(1 - scale-x) / 2 * window-width"; + offset-y = "(1 - scale-y) / 2 * window-height"; + scale-x = { + curve = "cubic-bezier(0,1.3,1,1)"; + duration = 0.5; + start = 0.6; + end = 1; + }; + scale-y = "scale-x"; + shadow-scale-x = "scale-x"; + shadow-scale-y = "scale-y"; + shadow-offset-x = "offset-x"; + shadow-offset-y = "offset-y"; + }, + { + triggers = ["geometry"] + scale-x = { + curve = "cubic-bezier(0,0,0,1.28)"; + duration = 0.5; + start = "window-width-before / window-width"; + end = 1; + } + scale-y = { + curve = "cubic-bezier(0,0,0,1.28)"; + duration = 0.5; + start = "window-height-before / window-height"; + end = 1; + } + offset-x = { + curve = "cubic-bezier(0,0,0,1.28)"; + duration = 0.5; + start = "window-x-before - window-x"; + end = 0; + } + offset-y = { + curve = "cubic-bezier(0,0,0,1.28)"; + duration = 0.5; + start = "window-y-before - window-y"; + end = 0; + } + + shadow-scale-x = "scale-x"; + shadow-scale-y = "scale-y"; + shadow-offset-x = "offset-x"; + shadow-offset-y = "offset-y"; + } + ) +} diff --git a/dots/config/bspwm/picom-rules.conf b/dots/config/bspwm/picom-rules.conf new file mode 100644 index 00000000..f52df929 --- /dev/null +++ b/dots/config/bspwm/picom-rules.conf @@ -0,0 +1,120 @@ + +rules: ( + +# Per window type rules +{ + match = "window_type = 'dropdown_menu'"; + shadow = false; + corner-radius = 0; + fade = false; +}, + +{ + match = "window_type = 'popup_menu'"; + shadow = false; + corner-radius = 0; + fade = false; +}, + +{ + match = "window_type = 'popup'"; + shadow = false; + corner-radius = 0; + fade = false; +}, + +{ + match = "window_type = 'dock'"; + shadow = false; + corner-radius = 0; + fade = true; +}, + +{ + match = "window_type = 'tooltip'"; + shadow = false; + corner-radius = 0; + fade = false; + opacity = 0.80; + full-shadow = false; +}, + +{ + match = "window_type = 'splash'"; + shadow = false; +}, + +{ + match = "window_type = 'dialog'"; + shadow = false; + corner-radius = 0; +}, + +{ + match = "window_type = 'menu'"; + shadow = false; + corner-radius = 0; +}, + +# Shadows rules +{ + match = "name = 'Notification' || " + "class_g ?= 'Notify-osd' || " + "class_g = 'Dunst' || " + "class_g = 'Polybar' || " + "class_g = 'jgmenu' || " + "class_g = 'scratch' || " + "class_g = 'Spotify' || " + "class_g = 'retroarch' || " + "class_g = 'firefox' || " + "class_g = 'Rofi' || " + "class_g = 'Screenkey' || " + "class_g = 'mpv' || " + "class_g = 'Viewnior' || " + "_GTK_FRAME_EXTENTS@"; + shadow = false; +}, + +# Fading animation rules +{ + match = "class_g = 'Polybar' || " + "class_g = 'slop' || " + "class_g = 'scratch' || " + "class_g = 'firefox' || " + "class_g = 'Eww - bar'"; + fade = false; +}, + +# Terminal transparency depending on if focused +{ + match = "class_g = 'Alacritty' && focused" + opacity = 0.99; +}, + +{ + match = "class_g = 'Alacritty' && !focused" + opacity = 0.80; +}, + +{ + match = "class_g = 'Updating'"; opacity = 0.95; +}, + +{ + match = "class_g = 'scratch'"; opacity = 0.90; +}, + +# Corner radius rules +{ + match = "class_g = 'Polybar' || " + "class_g = 'eww-bar' || " + "class_g = 'Viewnior' || " + "class_g = 'Rofi' || " + "class_g = 'mpv' || " + "class_g = 'retroarch'"; + corner-radius = 0; +}, + +@include "picom-animations.conf" + +) diff --git a/dots/config/bspwm/picom.conf b/dots/config/bspwm/picom.conf index 37debbe1..460b0df6 100644 --- a/dots/config/bspwm/picom.conf +++ b/dots/config/bspwm/picom.conf @@ -39,8 +39,8 @@ fading = false; fade-in-step = 0.03; fade-out-step = 0.03; -fade-delta = 6 - +fade-delta = 5 +no-fading-openclose = true no-fading-destroyed-argb = true fade-exclude = [ @@ -67,37 +67,6 @@ rounded-corners-exclude = [ "class_g = 'retroarch'" ]; -################################# -# Transparency / Opacity # -################################# - -active-opacity = 0.99; -inactive-opacity = 0.8; -inactive-opacity-override = false; - -focus-exclude = [ - "class_g = 'Cairo-clock'", - "class_g = 'slop'", # maim -]; - -opacity-rule = [ - "100:class_g *= 'firefox'", - "100:class_g *= 'Rofi'", - "100:fullscreen", - #"100:class_g = 'Alacritty'", - "100:class_g = 'FloaTerm'", - "95:class_g = 'Updating'", - "90:class_g = 'scratch'" -]; - -popup_menu: { - opacity = 1.0; -} - -dropdown_menu: { - opacity = 1.0; -} - ################################# # General Settings # ################################# @@ -113,7 +82,7 @@ mark-ovredir-focused = false; detect-rounded-corners = true; detect-client-opacity = true; detect-transient = true; -glx-no-stencil = true; +#glx-no-stencil = true; use-damage = true; log-level = "error"; @@ -129,3 +98,6 @@ wintypes: dock = { shadow = false; clip-shadow-above = false; } dnd = { shadow = false; } }; + + +@include "picom-rules.conf" diff --git a/flake.lock b/flake.lock index 1a00af16..c17b4490 100644 --- a/flake.lock +++ b/flake.lock @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "owner": "numtide", "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "type": "github" }, "original": { @@ -67,11 +67,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1724212992, - "narHash": "sha256-MXxSlGiA/wIhts79vKUM1mRYk1BKW8amVx9D8ZUXAHY=", + "lastModified": 1728360193, + "narHash": "sha256-UpN2xQiIzHLD3WZcr51BKtJTDLbjzB5H8cdg4Zn/LX4=", "owner": "rycee", "repo": "nur-expressions", - "rev": "e4d175f6f71348b15f20dcd1ad15193149736412", + "rev": "4728d8775b311938b985c1b8ba07e077990d2a4b", "type": "gitlab" }, "original": { @@ -140,11 +140,11 @@ ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -191,11 +191,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -221,11 +221,11 @@ ] }, "locked": { - "lastModified": 1723803910, - "narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=", + "lastModified": 1728092656, + "narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba", + "rev": "1211305a5b237771e13fcca0c51e60ad47326a9a", "type": "github" }, "original": { @@ -285,11 +285,11 @@ ] }, "locked": { - "lastModified": 1723986931, - "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", + "lastModified": 1728337164, + "narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=", "owner": "nix-community", "repo": "home-manager", - "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", + "rev": "038630363e7de57c36c417fd2f5d7c14773403e4", "type": "github" }, "original": { @@ -307,11 +307,11 @@ ] }, "locked": { - "lastModified": 1723986931, - "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", + "lastModified": 1728335212, + "narHash": "sha256-iQTkbf88OZs8oZaZduq+qa0PXEgD0mHGEcuGy5BoLUs=", "owner": "nix-community", "repo": "home-manager", - "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", + "rev": "271c83e21ea81f39a42ad128384e0e6804956a88", "type": "github" }, "original": { @@ -374,11 +374,11 @@ ] }, "locked": { - "lastModified": 1723859949, - "narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=", + "lastModified": 1727999297, + "narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "076b9a905af8a52b866c8db068d6da475839d97b", + "rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b", "type": "github" }, "original": { @@ -389,11 +389,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723991338, - "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", + "lastModified": 1728018373, + "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", "type": "github" }, "original": { @@ -449,11 +449,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1724222231, - "narHash": "sha256-IFlMn1lgVsZQZC9WklY9YKcCdI0mUxSYZ7EfkaKCsQU=", + "lastModified": 1728336850, + "narHash": "sha256-2RcPY41+UopyGwrPmsAFJC6CCobuuz4sNemC5cMb5GY=", "owner": "nix-community", "repo": "nixvim", - "rev": "b7f419a759f70126e220533b724cc17e8528b184", + "rev": "abc7f450adc3b12d66c451972b1876d5194644bb", "type": "github" }, "original": { @@ -471,11 +471,11 @@ ] }, "locked": { - "lastModified": 1723969429, - "narHash": "sha256-BuewfNEXEf11MIkJY+uvWsdLu1dIvgJqntWChvNdALg=", + "lastModified": 1728335476, + "narHash": "sha256-be/noaRSTdgjk1bbu2ofbEC3Tr5nDCsUttn+mwfDdpc=", "owner": "NuschtOS", "repo": "search", - "rev": "a05d1805f2a2bc47d230e5e92aecbf69f784f3d0", + "rev": "2865c073858af03bc015ea045d2fd496d3f8b574", "type": "github" }, "original": { @@ -600,11 +600,11 @@ ] }, "locked": { - "lastModified": 1723808491, - "narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=", + "lastModified": 1727984844, + "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a", + "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", "type": "github" }, "original": { @@ -618,11 +618,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": {