From 062b56985c83a44f0fb5c350c25347caf04de9b5 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 6 Nov 2023 17:02:08 +0800 Subject: [PATCH] home,picom: picom.conf -> home-manager configuration --- .../dotfiles/config/picom/picom.conf | 67 ----------------- .../resources/wm/components/picom.nix | 73 ++++++++++++++++++- 2 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 users/guanranwang/home-manager/resources/dotfiles/config/picom/picom.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/picom/picom.conf b/users/guanranwang/home-manager/resources/dotfiles/config/picom/picom.conf deleted file mode 100644 index 84db1ef..0000000 --- a/users/guanranwang/home-manager/resources/dotfiles/config/picom/picom.conf +++ /dev/null @@ -1,67 +0,0 @@ -# Corner -corner-radius = 0; -round-borders = 0; - - -# Shadow -shadow = true; -shadow-radius = 15; -shadow-offset-x = -8; -shadow-offset-y = -8; -shadow-opacity = 0.2; -shadow-exclude = [ - "_GTK_FRAME_EXTENTS@:c", -]; - - -# Fade -fading = true; -fade-in-step = 0.04; -fade-out-step = 0.04; -fade-delta = 3; - - -# Dim inactive window -inactive-dim=0 -focus-exclude = [ - "class_g = 'Rofi'", -]; - -# Opacity -frame-opacity = 1; -active-opacity = 1; -inactive-opacity = 1; -dropdown_menu = { opacity = 1; } -popup_menu = { opacity = 1; } - -opacity-rule = [ - "100:_NET_WM_STATE@:32a = '_NET_WM_STATE_FULLSCREEN'", - "90:class_g = 'Polybar'", - "90:class_g = 'Rofi'", - "90:class_g = 'Alacritty'", -]; - - -# Blur -blur: { - method = "dual_kawase"; - strength = 9; -} -blur-background-exclude = [ - "_GTK_FRAME_EXTENTS@:c", - "class_g = 'Main'", -]; - -backend = "glx"; -vsync = true; -use-damage = false; -unredir-if-possible = true; - -wintypes: { - dropdown_menu = { opacity = 1; } - tooltip = { fade = true; shadow = true; opacity = 0.1; focus = true; } - popup_menu = { opacity = 1; } - - notification = { redir-ignore = true;} - notify = { redir-ignore = true;} -} diff --git a/users/guanranwang/home-manager/resources/wm/components/picom.nix b/users/guanranwang/home-manager/resources/wm/components/picom.nix index 023aaab..e7727d0 100644 --- a/users/guanranwang/home-manager/resources/wm/components/picom.nix +++ b/users/guanranwang/home-manager/resources/wm/components/picom.nix @@ -1,8 +1,75 @@ {...}: { services.picom = { enable = true; - }; + settings = { + # Corner + corner-radius = 0; + round-borders = 0; - # TODO: picom.conf -> home-manager options - xdg.configFile."picom/picom.conf".source = ../../dotfiles/config/picom/picom.conf; + # Shadow + shadow = true; + shadow-radius = 15; + shadow-offset-x = -8; + shadow-offset-y = -8; + shadow-opacity = 0.2; + shadow-exclude = [ + "_GTK_FRAME_EXTENTS@=c" + ]; + + # Fade + fading = true; + fade-in-step = 0.04; + fade-out-step = 0.04; + fade-delta = 3; + + # Dim inactive window + inactive-dim = 0; + focus-exclude = [ + "class_g = 'Rofi'" + ]; + + # Opacity + frame-opacity = 1; + active-opacity = 1; + inactive-opacity = 1; + dropdown_menu = {opacity = 1;}; + popup_menu = {opacity = 1;}; + + opacity-rule = [ + "100=_NET_WM_STATE@=32a = '_NET_WM_STATE_FULLSCREEN'" + "90=class_g = 'Polybar'" + "90=class_g = 'Rofi'" + "90=class_g = 'Alacritty'" + ]; + + # Blur + blur = { + method = "dual_kawase"; + strength = 9; + }; + blur-background-exclude = [ + "_GTK_FRAME_EXTENTS@=c" + "class_g = 'Main'" + ]; + + backend = "glx"; + vsync = true; + use-damage = false; + unredir-if-possible = true; + + wintypes = { + dropdown_menu = {opacity = 1;}; + tooltip = { + fade = true; + shadow = true; + opacity = 0.1; + focus = true; + }; + popup_menu = {opacity = 1;}; + + notification = {redir-ignore = true;}; + notify = {redir-ignore = true;}; + }; + }; + }; }