1
1
Fork 0

Compare commits

..

4 commits

Author SHA1 Message Date
2b2ffe0b1f
niri: modify rules
Signed-off-by: Myned <dev@bjork.tech>
2025-01-02 12:02:11 -06:00
a8b86890db
niri: add disabled outputs option
Signed-off-by: Myned <dev@bjork.tech>
2025-01-02 12:01:56 -06:00
5ba120d754
mynix: disable vrr
Signed-off-by: Myned <dev@bjork.tech>
2025-01-02 12:01:05 -06:00
1eb0b57351
niri: use relative resize instead of preset binds
Signed-off-by: Myned <dev@bjork.tech>
2025-01-02 12:00:25 -06:00
4 changed files with 35 additions and 17 deletions

View file

@ -13,8 +13,12 @@
width = 3440;
height = 1440;
refresh = 100;
vrr = true;
desktops.niri.output.connectors = ["DP-1" "DP-2" "DP-3" "HDMI-A-1" "HDMI-A-2" "HDMI-A-3"];
#// vrr = true;
desktops.niri.output = {
connectors = ["DP-1" "DP-2" "DP-3"];
disabled = ["HDMI-A-1" "HDMI-A-2" "HDMI-A-3"];
};
programs.looking-glass = {
enable = true;

View file

@ -163,8 +163,12 @@ in {
(key "WheelScrollRight" "Mod+Shift" move-column-right-or-to-monitor-right)
(key "WheelScrollUp" "Mod" focus-window-or-workspace-up)
(key "WheelScrollUp" "Mod+Shift" move-window-up-or-to-workspace-up)
(key "X" "Mod" switch-preset-column-width)
(key "Z" "Mod" switch-preset-window-height)
#// (key "X" "Mod" switch-preset-column-width)
(key "X" "Mod" (set-column-width "+10%"))
(key "X" "Mod+Shift" (set-window-height "+10%"))
#// (key "Z" "Mod" switch-preset-window-height)
(key "Z" "Mod" (set-column-width "-10%"))
(key "Z" "Mod+Shift" (set-window-height "-10%"))
# BUG: Release binds execute with all binds involving that modifier
# https://github.com/YaLTeR/niri/issues/605

View file

@ -67,8 +67,8 @@ in {
pip = with config.custom; rec {
x = gap;
y = gap;
w = builtins.floor (h * 16 / 9); # 16:9
h = builtins.floor (height / 3.0 - gap * 2 - border); # 33%
w = builtins.floor (width * 0.3 - gap); # 30%
h = builtins.floor (w * 9 / 16); # 16:9
};
in
with inputs.niri-flake.lib;
@ -80,6 +80,7 @@ in {
(plain "window-rule" [
(leaf "match" {is-floating = true;})
(plain "border" [(flag "off")])
(plain "focus-ring" [(flag "off")])
])
(plain "window-rule" [
@ -102,6 +103,10 @@ in {
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug
settings.debug = {
#// disable-direct-scanout = [];
# BUG: Crash when multiple outputs from the same monitor are enabled
# https://github.com/YaLTeR/niri/issues/734
disable-monitor-names = [];
};
};
}

View file

@ -9,6 +9,7 @@ in {
options.custom.desktops.niri.output = {
enable = mkOption {default = false;};
connectors = mkOption {default = [];};
disabled = mkOption {default = [];};
};
config = mkIf cfg.enable {
@ -18,20 +19,24 @@ in {
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs
#?? niri msg outputs
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
name = connector;
name = connector;
value = {
background-color = "#073642";
value = {
background-color = "#073642";
mode = with config.custom; {
inherit width height;
refresh = refresh + 0.0; # Convert to float
mode = with config.custom; {
inherit width height;
refresh = refresh + 0.0; # Convert to float
};
scale = config.custom.scale;
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
};
scale = config.custom.scale;
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
};
}));
})
++ (forEach cfg.disabled (connector: {
name = connector;
value = {enable = false;};
})));
}
];
};