From ce95e3fcc062583c2cdae6091b4ec475a3e92aeb Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Wed, 2 Jul 2025 14:17:12 +0800 Subject: [PATCH] module(niri): Improve opacity settings for window, and use focus-ring instead of border --- home/david/modules/programs/niri/config.nix | 32 +++++++-------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/home/david/modules/programs/niri/config.nix b/home/david/modules/programs/niri/config.nix index a8efb48..06b40f7 100644 --- a/home/david/modules/programs/niri/config.nix +++ b/home/david/modules/programs/niri/config.nix @@ -405,12 +405,13 @@ in ]) (plain "layout" [ (plain "border" [ + (flag "off") (leaf "width" [4]) (leaf "active-color" ["#7fc8ff"]) (leaf "inactive-color" ["#505050"]) ]) (plain "focus-ring" [ - (flag "off") + # (flag "off") (leaf "width" [4]) (leaf "active-color" ["#7fc8ff"]) (leaf "inactive-color" ["#505050"]) @@ -466,30 +467,17 @@ in (leaf "block-out-from" ["screen-capture"]) ]) (window-rule [ - (match [ - { - app-id = "^com\\.mitchellh\\.ghostty$"; - is-active = true; - } - { - app-id = "^Alacritty$"; - is-active = true; - } - ]) + (match [{is-active = true;}]) + (leaf "opacity" [0.95]) + ]) + (window-rule [ + (match [{is-active = false;}]) + (leaf "opacity" [0.8]) (leaf "draw-border-with-background" [false]) ]) (window-rule [ - (match [ - { - app-id = "^com\\.mitchellh\\.ghostty$"; - is-active = false; - } - { - app-id = "^Alacritty$"; - is-active = false; - } - ]) - (leaf "opacity" [0.8]) + (match [{app-id = "^Alacritty$";}]) + (match [{app-id = "^com\\.mitchellh\\.ghostty$";}]) (leaf "draw-border-with-background" [false]) ]) (window-rule [