ooknet/home/modules/desktop/wayland/windowManager/hyprland/settings/monitor.nix
ooks-io 2130903850 refactor(hyprland): change to structure of hyprland configuration
- move bind scripts to standalone shell applications
- split configuration into more modules
- still more work to be done
2024-03-08 17:29:54 +13:00

20 lines
626 B
Nix

{ lib, config, ... }:
let
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.settings = {
monitor = lib.concatMap (m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}";
in
[ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else [])
) (config.monitors);
};
};
}