1 Commits

Author SHA1 Message Date
m3ta-chiron 826569ed98 feat: migrate host Hyprland configs to Lua (Hyprland 0.55+)
- m3-kratos/home.nix: use hl.monitor({}), hl.workspace_rule({}),
  hl.window_rule({}) table-based Lua API
- m3-ares/home.nix: same Lua API + tuxedo-backlight via hl.on()
- Update flake.lock: home-manager -> 74f170c6 (2026-05-18)
2026-05-18 17:27:15 +02:00
3 changed files with 46 additions and 41 deletions
Generated
+3 -3
View File
@@ -448,11 +448,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778248595, "lastModified": 1779113444,
"narHash": "sha256-dhFgEjoeJMYN/7OY6xfxS799YB4IjbbYXTjyGIJyLpc=", "narHash": "sha256-/L61sT1PIKmGWIQpIh0uJGH/ANvcsf6y4alxtb9kelg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fdb2ccba9d5e1238d32e0c4a3ec1a277efa80c1d", "rev": "74f170c62d57f90e656841f1f699e6bdf40f0a24",
"type": "github" "type": "github"
}, },
"original": { "original": {
+24 -20
View File
@@ -36,35 +36,39 @@ with lib; {
}; };
} }
# ── Hyprland monitor layout ── # ── Hyprland monitor layout & host-specific rules ──
(mkIf config.desktop.wm.hyprland.enable { (mkIf config.desktop.wm.hyprland.enable {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
exec-once = ["tuxedo-backlight"]; # Laptop internal + external HDMI
monitor = [ monitor = [
"eDP-1,preferred,0x0,1.25" { output = "eDP-1"; mode = "preferred"; position = "0x0"; scale = 1.25; }
"HDMI-A-1,1920x1080@120,2560x0,1" { output = "HDMI-A-1"; mode = "1920x1080@120"; position = "2560x0"; scale = 1; }
]; ];
workspace = [ workspace_rule = [
"1, monitor:eDP-1, default:true" { workspace = 1; monitor = "eDP-1"; default = true; }
"2, monitor:eDP-1" { workspace = 2; monitor = "eDP-1"; }
"3, monitor:eDP-1" { workspace = 3; monitor = "eDP-1"; }
"4, monitor:HDMI-A-1" { workspace = 4; monitor = "HDMI-A-1"; }
"5, monitor:HDMI-A-1,border:false,rounding:false" { workspace = 5; monitor = "HDMI-A-1"; border = false; rounding = false; }
"6, monitor:HDMI-A-1" { workspace = 6; monitor = "HDMI-A-1"; }
]; ];
windowrule = [ window_rule = [
"match:class dev.zed.Zed, workspace 1" { match = { class = "dev.zed.Zed" }; workspace = "1"; }
"match:class Msty, workspace 1" { match = { class = "Msty" }; workspace = "1"; }
"match:class ^(com.obsproject.Studio)$, workspace 2" { match = { class = "^com.obsproject.Studio$" }; workspace = "2"; }
"match:class ^(brave-browser)$, workspace 4, opacity 1.0" { match = { class = "^(brave-browser)$" }; workspace = "4"; opacity = 1.0; }
"match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" { match = { class = "^(vivaldi-stable)$" }; workspace = "4"; opacity = 1.0; }
"match:class ^steam_app_\\d+$, fullscreen on" { match = { class = "^steam_app_\\d+$" }; fullscreen = true; workspace = "5"; idle_inhibit = "focus"; }
"match:class ^steam_app_\\d+$, workspace 5"
"match:class ^steam_app_\\d+$, idle_inhibit focus"
]; ];
}; };
extraConfig = mkAfter ''
-- Host startup: TUXEDO backlight
hl.on("hyprland.start", function()
hl.exec_cmd("tuxedo-backlight")
end)
'';
}; };
}) })
]; ];
+19 -18
View File
@@ -36,31 +36,32 @@ with lib; {
}; };
} }
# ── Hyprland monitor layout ── # ── Hyprland monitor layout & host-specific rules ──
(mkIf config.desktop.wm.hyprland.enable { (mkIf config.desktop.wm.hyprland.enable {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
# Dual monitor: DP-1 left, DP-2 right
monitor = [ monitor = [
"DP-1,2560x1440@144,0x0,1" { output = "DP-1"; mode = "2560x1440@144"; position = "0x0"; scale = 1; }
"DP-2,2560x1440@144,2560x0,1" { output = "DP-2"; mode = "2560x1440@144"; position = "2560x0"; scale = 1; }
]; ];
workspace = [ workspace_rule = [
"1, monitor:DP-1, default:true" { workspace = 1; monitor = "DP-1"; default = true; }
"2, monitor:DP-1" { workspace = 2; monitor = "DP-1"; }
"3, monitor:DP-1" { workspace = 3; monitor = "DP-1"; }
"4, monitor:DP-2" { workspace = 4; monitor = "DP-2"; }
"5, monitor:DP-2" { workspace = 5; monitor = "DP-2"; }
"6, monitor:DP-2" { workspace = 6; monitor = "DP-2"; }
"7, monitor:DP-2" { workspace = 7; monitor = "DP-2"; }
]; ];
windowrule = [ window_rule = [
"match:class dev.zed.Zed, workspace 1" { match = { class = "dev.zed.Zed" }; workspace = "1"; }
"match:class Msty, workspace 1" { match = { class = "Msty" }; workspace = "1"; }
"match:class ^(com.obsproject.Studio)$, workspace 2" { match = { class = "^com.obsproject.Studio$" }; workspace = "2"; }
"match:class ^(brave-browser)$, workspace 4, opacity 1.0" { match = { class = "^(brave-browser)$" }; workspace = "4"; opacity = 1.0; }
"match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" { match = { class = "^(vivaldi-stable)$" }; workspace = "4"; opacity = 1.0; }
"match:class ^steam_app_\\d+$, idle_inhibit focus" { match = { class = "^steam_app_\\d+$" }; idle_inhibit = "focus"; }
]; ];
}; };
}; };