refactor(desktop): standardize mangowm settings across hosts

This commit is contained in:
tux
2026-05-12 21:01:53 +05:30
parent 626dd68af6
commit fdc63b9307
3 changed files with 310 additions and 255 deletions

View File

@@ -1,21 +1,41 @@
{ inputs, ... }: { inputs, ... }:
{ {
flake.modules.homeManager.desktop = flake.modules.homeManager.desktop =
{ pkgs, ... }: {
config,
pkgs,
lib,
...
}:
with lib;
let
cfg = config.tnix.desktop.mangowm;
in
{ {
imports = [ imports = [
inputs.mango.hmModules.mango inputs.mango.hmModules.mango
]; ];
options.tnix.desktop.mangowm = {
enable = mkEnableOption "Enable MangoWM";
monitorRule = mkOption {
type = with types; listOf str;
default = [ ];
};
tagRule = mkOption {
type = with types; listOf str;
default = [ ];
};
};
config = mkIf cfg.enable {
wayland.windowManager.mango = { wayland.windowManager.mango = {
enable = true; enable = true;
settings = { settings = {
# Monitors # Monitors
monitorrule = [ monitorrule = cfg.monitorRule;
"name:DP-2, width:1440, height:2560, refresh:144, x:0, y:0, vrr:0, rr:1"
"name:DP-3, width:2560, height:1440, refresh:144, x:1440, y:0, vrr:0"
"name:DP-1, width:1080, height:1920, refresh:144, x:4000, y:0, vrr:0, rr:3"
];
focus_cross_monitor = 1; focus_cross_monitor = 1;
exchange_cross_monitor = 1; exchange_cross_monitor = 1;
@@ -68,25 +88,7 @@
overviewgappo = 15; overviewgappo = 15;
# layouts # layouts
tagrule = [ tagrule = cfg.tagRule;
"id:1, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:2, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:3, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:4, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:5, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:1, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:2, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:3, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:4, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:5, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:1, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:2, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:3, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:4, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:5, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
];
# Keybindings # Keybindings
mousebind = [ mousebind = [
@@ -250,4 +252,5 @@
dgop dgop
]; ];
}; };
};
} }

View File

@@ -5,7 +5,25 @@
desktop desktop
]; ];
tnix.services.lan-mouse = { tnix = {
desktop = {
mangowm = {
enable = true;
monitorRule = [
"name:eDP-1, width:2560, height:1440, refresh:165, x:0, y:0, vrr:1"
];
tagRule = [
"id:1, layout_name:tile"
"id:2, layout_name:tile"
"id:3, layout_name:tile"
"id:4, layout_name:tile"
"id:5, layout_name:scroller"
];
};
};
services.lan-mouse = {
enable = true; enable = true;
settings = { settings = {
authorized_fingerprints = { authorized_fingerprints = {
@@ -14,6 +32,7 @@
}; };
}; };
}; };
};
home.stateVersion = "26.05"; home.stateVersion = "26.05";
}; };

View File

@@ -5,7 +5,39 @@
desktop desktop
]; ];
tnix.services.lan-mouse = { tnix = {
desktop = {
mangowm = {
enable = true;
monitorRule = [
"name:DP-2, width:1440, height:2560, refresh:144, x:0, y:0, vrr:0, rr:1"
"name:DP-3, width:2560, height:1440, refresh:144, x:1440, y:0, vrr:0"
"name:DP-1, width:1080, height:1920, refresh:144, x:4000, y:0, vrr:0, rr:3"
];
tagRule = [
"id:1, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:2, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:3, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:4, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:5, layout_name:vertical_tile, monitor_name:DP-2, no_hide:1"
"id:1, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:2, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:3, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:4, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:5, layout_name:tile, monitor_name:DP-3, no_hide:1"
"id:1, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:2, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:3, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:4, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
"id:5, layout_name:vertical_tile, monitor_name:DP-1, no_hide:1"
];
};
};
services.lan-mouse = {
enable = true; enable = true;
settings = { settings = {
clients = [ clients = [
@@ -18,6 +50,7 @@
]; ];
}; };
}; };
};
home.stateVersion = "26.05"; home.stateVersion = "26.05";
}; };