feat: add hyprland monitor options
This commit is contained in:
parent
a11717c8ce
commit
1cae5d144a
3 changed files with 48 additions and 8 deletions
|
|
@ -5,8 +5,8 @@
|
|||
, ...
|
||||
} @ args:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkOption mkEnableOption mkIf types getExe genAttrs optionalAttrs optional;
|
||||
cfg = config.my.programs.hyprland;
|
||||
|
||||
hyprland = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
|
|
@ -31,9 +31,38 @@ in
|
|||
default = [ "de" "us" ];
|
||||
};
|
||||
monitors = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "monitor settings";
|
||||
default = [ ",preferred,auto,1" ];
|
||||
type = types.attrsOf (
|
||||
let
|
||||
sub = types.submodule {
|
||||
options = {
|
||||
resolution = mkOption {
|
||||
type = types.strMatching "\(preferred\)|\([[:digit:]]+x[[:digit:]]+\(@[[:digit:]]+\)\?\)";
|
||||
default = "preferred";
|
||||
};
|
||||
position = mkOption {
|
||||
type = types.strMatching "\(auto\)|\(-\?[[:digit:]]+x-?[[:digit:]]+\)";
|
||||
default = "auto";
|
||||
};
|
||||
disabled = mkEnableOption "disabled";
|
||||
scale = mkOption {
|
||||
type = types.oneOf [ types.float (types.strMatching "auto") ];
|
||||
default = 1.0;
|
||||
apply = x: if lib.isFloat x then lib.strings.floatToString x else x;
|
||||
};
|
||||
extra = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
apply = lib.concatStringsSep ",";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
sub
|
||||
);
|
||||
description = "monitor setting";
|
||||
default = {
|
||||
"" = { };
|
||||
};
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
|
|
@ -51,6 +80,7 @@ in
|
|||
# foot.enable = true;
|
||||
kitty.enable = true;
|
||||
rofi.enable = true;
|
||||
hyprland.monitors."" = lib.mkDefault { };
|
||||
};
|
||||
wallpapers.enable = true;
|
||||
services = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue