How to enable MODE MAX for all displays?
Cloudef opened this issue · 4 comments
Cloudef commented
Can you put wildcard into NAME_DESC?
Cloudef commented
Not ideal, but currently doing this workaround:
systemd.user.services.way-displays = let
adapters = filter (v: v != "") (splitString "\n" (builtins.readFile (pkgs.runCommandLocal "list-adapters" {
__noChroot = true;
} ''
find /sys/devices -name "edid" -printf "%h\n" | while read -r path; do
base="''${path##*/}"
printf '%s\n' "''${base/card?-}"
done > $out
'')));
config = pkgs.writeText "config.yaml" (''
AUTO_SCALE: false
'' + concatMapStringsSep "\n" (adp: ''
MODE:
- NAME_DESC: ${adp}
MAX: true
'') adapters);
in mkIf (cfg.monitors == []) {
Unit.Description = "Wayland automatic display manager";
Service.ExecStart = "${pkgs.way-displays}/bin/way-displays --config ${config}";
Service.Restart = "on-failure";
Install.WantedBy = [ "hyprland-session.target" ];
};
alex-courtis commented
Yes, you can use a regex: way-displays Configuration
Please let me know if that works for you.
Cloudef commented
Oh, I missed that completely. I'll test it out right away.
Cloudef commented
Seems to work, thank you