Compare commits
4 commits
f3b9399b11
...
2b2ffe0b1f
Author | SHA1 | Date | |
---|---|---|---|
2b2ffe0b1f | |||
a8b86890db | |||
5ba120d754 | |||
1eb0b57351 |
4 changed files with 35 additions and 17 deletions
|
@ -13,8 +13,12 @@
|
||||||
width = 3440;
|
width = 3440;
|
||||||
height = 1440;
|
height = 1440;
|
||||||
refresh = 100;
|
refresh = 100;
|
||||||
vrr = true;
|
#// vrr = true;
|
||||||
desktops.niri.output.connectors = ["DP-1" "DP-2" "DP-3" "HDMI-A-1" "HDMI-A-2" "HDMI-A-3"];
|
|
||||||
|
desktops.niri.output = {
|
||||||
|
connectors = ["DP-1" "DP-2" "DP-3"];
|
||||||
|
disabled = ["HDMI-A-1" "HDMI-A-2" "HDMI-A-3"];
|
||||||
|
};
|
||||||
|
|
||||||
programs.looking-glass = {
|
programs.looking-glass = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -163,8 +163,12 @@ in {
|
||||||
(key "WheelScrollRight" "Mod+Shift" move-column-right-or-to-monitor-right)
|
(key "WheelScrollRight" "Mod+Shift" move-column-right-or-to-monitor-right)
|
||||||
(key "WheelScrollUp" "Mod" focus-window-or-workspace-up)
|
(key "WheelScrollUp" "Mod" focus-window-or-workspace-up)
|
||||||
(key "WheelScrollUp" "Mod+Shift" move-window-up-or-to-workspace-up)
|
(key "WheelScrollUp" "Mod+Shift" move-window-up-or-to-workspace-up)
|
||||||
(key "X" "Mod" switch-preset-column-width)
|
#// (key "X" "Mod" switch-preset-column-width)
|
||||||
(key "Z" "Mod" switch-preset-window-height)
|
(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
|
# BUG: Release binds execute with all binds involving that modifier
|
||||||
# https://github.com/YaLTeR/niri/issues/605
|
# https://github.com/YaLTeR/niri/issues/605
|
||||||
|
|
|
@ -67,8 +67,8 @@ in {
|
||||||
pip = with config.custom; rec {
|
pip = with config.custom; rec {
|
||||||
x = gap;
|
x = gap;
|
||||||
y = gap;
|
y = gap;
|
||||||
w = builtins.floor (h * 16 / 9); # 16:9
|
w = builtins.floor (width * 0.3 - gap); # 30%
|
||||||
h = builtins.floor (height / 3.0 - gap * 2 - border); # 33%
|
h = builtins.floor (w * 9 / 16); # 16:9
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
with inputs.niri-flake.lib;
|
with inputs.niri-flake.lib;
|
||||||
|
@ -80,6 +80,7 @@ in {
|
||||||
(plain "window-rule" [
|
(plain "window-rule" [
|
||||||
(leaf "match" {is-floating = true;})
|
(leaf "match" {is-floating = true;})
|
||||||
(plain "border" [(flag "off")])
|
(plain "border" [(flag "off")])
|
||||||
|
(plain "focus-ring" [(flag "off")])
|
||||||
])
|
])
|
||||||
|
|
||||||
(plain "window-rule" [
|
(plain "window-rule" [
|
||||||
|
@ -102,6 +103,10 @@ in {
|
||||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug
|
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug
|
||||||
settings.debug = {
|
settings.debug = {
|
||||||
#// disable-direct-scanout = [];
|
#// disable-direct-scanout = [];
|
||||||
|
|
||||||
|
# BUG: Crash when multiple outputs from the same monitor are enabled
|
||||||
|
# https://github.com/YaLTeR/niri/issues/734
|
||||||
|
disable-monitor-names = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ in {
|
||||||
options.custom.desktops.niri.output = {
|
options.custom.desktops.niri.output = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
connectors = mkOption {default = [];};
|
connectors = mkOption {default = [];};
|
||||||
|
disabled = mkOption {default = [];};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -18,20 +19,24 @@ in {
|
||||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs
|
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs
|
||||||
#?? niri msg outputs
|
#?? niri msg outputs
|
||||||
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
|
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
|
||||||
name = connector;
|
name = connector;
|
||||||
|
|
||||||
value = {
|
value = {
|
||||||
background-color = "#073642";
|
background-color = "#073642";
|
||||||
|
|
||||||
mode = with config.custom; {
|
mode = with config.custom; {
|
||||||
inherit width height;
|
inherit width height;
|
||||||
refresh = refresh + 0.0; # Convert to float
|
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;
|
++ (forEach cfg.disabled (connector: {
|
||||||
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
|
name = connector;
|
||||||
};
|
value = {enable = false;};
|
||||||
}));
|
})));
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue