module(niri): Improve opacity settings for window, and use focus-ring instead of border

This commit is contained in:
ulic-youthlic 2025-07-02 14:17:12 +08:00
parent 119897a545
commit ce95e3fcc0
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -405,12 +405,13 @@ in
]) ])
(plain "layout" [ (plain "layout" [
(plain "border" [ (plain "border" [
(flag "off")
(leaf "width" [4]) (leaf "width" [4])
(leaf "active-color" ["#7fc8ff"]) (leaf "active-color" ["#7fc8ff"])
(leaf "inactive-color" ["#505050"]) (leaf "inactive-color" ["#505050"])
]) ])
(plain "focus-ring" [ (plain "focus-ring" [
(flag "off") # (flag "off")
(leaf "width" [4]) (leaf "width" [4])
(leaf "active-color" ["#7fc8ff"]) (leaf "active-color" ["#7fc8ff"])
(leaf "inactive-color" ["#505050"]) (leaf "inactive-color" ["#505050"])
@ -466,30 +467,17 @@ in
(leaf "block-out-from" ["screen-capture"]) (leaf "block-out-from" ["screen-capture"])
]) ])
(window-rule [ (window-rule [
(match [ (match [{is-active = true;}])
{ (leaf "opacity" [0.95])
app-id = "^com\\.mitchellh\\.ghostty$"; ])
is-active = true; (window-rule [
} (match [{is-active = false;}])
{ (leaf "opacity" [0.8])
app-id = "^Alacritty$";
is-active = true;
}
])
(leaf "draw-border-with-background" [false]) (leaf "draw-border-with-background" [false])
]) ])
(window-rule [ (window-rule [
(match [ (match [{app-id = "^Alacritty$";}])
{ (match [{app-id = "^com\\.mitchellh\\.ghostty$";}])
app-id = "^com\\.mitchellh\\.ghostty$";
is-active = false;
}
{
app-id = "^Alacritty$";
is-active = false;
}
])
(leaf "opacity" [0.8])
(leaf "draw-border-with-background" [false]) (leaf "draw-border-with-background" [false])
]) ])
(window-rule [ (window-rule [