Use defaultMonitor instead of monitor

This commit is contained in:
DashieTM 2024-09-08 15:20:26 +02:00
parent 3ac742cc45
commit 2c45bcf6ad
8 changed files with 128 additions and 93 deletions

View file

@ -1,9 +1,10 @@
{ config
, lib
, inputs
, pkgs
, options
, ...
{
config,
lib,
inputs,
pkgs,
options,
...
}:
{
options.mods = {
@ -17,7 +18,7 @@
'';
};
monitor = lib.mkOption {
default = "${config.conf.monitor}";
default = "${config.conf.defaultMonitor}";
example = "eDP-1";
type = lib.types.str;
description = ''
@ -26,7 +27,7 @@
'';
};
scale = lib.mkOption {
default = "${config.conf.scale}";
default = "${config.conf.defaultMonitorScale}";
example = "1.5";
type = lib.types.str;
description = ''
@ -35,7 +36,7 @@
'';
};
resolution = lib.mkOption {
default = "auto";
default = "${config.conf.defaultMonitorMode}";
example = "3440x1440@180";
type = lib.types.str;
description = ''

View file

@ -42,9 +42,13 @@
'';
};
custom_css = lib.mkOption {
default = { };
example = { };
type = with lib.types; attrsOf anything;
default = '''';
example = ''
#window {
border-radius: none;
}
'';
type = lib.types.lines;
description = ''
Custom anyrun css.
Will be merged with default css if enabled.
@ -133,7 +137,7 @@
border-radius: 10px;
}
''
++ config.mods.hyprland.anyrun.custom_css
+ config.mods.hyprland.anyrun.custom_css
else
config.mods.hyprland.anyrun.custom_css;
};

View file

@ -17,7 +17,12 @@
'';
};
monitor = lib.mkOption {
default = [ ];
default = [
# main monitor
"${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}"
# all others
",highrr,auto,1"
];
example = [ "DP-1,3440x1440@180,2560x0,1,vrr,0" ];
type = with lib.types; listOf str;
description = ''

View file

@ -33,7 +33,7 @@
input-field = [
{
monitor = "${config.conf.monitor}";
monitor = "${config.conf.defaultMonitor}";
placeholder_text = "password or something";
}
@ -41,7 +41,7 @@
label = [
{
monitor = "${config.conf.monitor}";
monitor = "${config.conf.defaultMonitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";

View file

@ -162,7 +162,7 @@ in
#"another_feature"
];
config = {
monitors."${config.conf.monitor}" = {
monitors."${config.conf.defaultMonitor}" = {
end = config.conf.ironbar.modules ++ [
{
type = "sys_info";