mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
vanadium/display: use lib.mkMerge
This commit is contained in:
parent
5fd498fbed
commit
688389edeb
1 changed files with 22 additions and 12 deletions
|
|
@ -85,7 +85,7 @@
|
||||||
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
||||||
# To get the current config, run `xrandr --auto` and then `autorandr --config`
|
# To get the current config, run `xrandr --auto` and then `autorandr --config`
|
||||||
configs = {
|
configs = {
|
||||||
allOff = lib.genAttrs devices.all (_: {enable = false;});
|
allOff = lib.genAttrs devices.all (_: {enable = lib.mkDefault false;});
|
||||||
enableBuiltin = {
|
enableBuiltin = {
|
||||||
eDP-1 = {
|
eDP-1 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -109,27 +109,37 @@
|
||||||
|
|
||||||
frameworkBuiltin = {
|
frameworkBuiltin = {
|
||||||
fingerprint = fingerprints.built-in;
|
fingerprint = fingerprints.built-in;
|
||||||
config = configs.allOff // configs.enableBuiltin;
|
config = lib.mkMerge [
|
||||||
|
configs.allOff
|
||||||
|
configs.enableBuiltin
|
||||||
|
];
|
||||||
hooks.postswitch = switches.setDPI {dpi = 150;};
|
hooks.postswitch = switches.setDPI {dpi = 150;};
|
||||||
};
|
};
|
||||||
|
|
||||||
mkAsusProfile = name: {
|
mkAsusProfile = name: {
|
||||||
fingerprint = fingerprints.built-in // fingerprints.asus-monitor name;
|
fingerprint = lib.mkMerge [
|
||||||
config = configs.allOff // configs.enableDevice name;
|
fingerprints.built-in
|
||||||
hooks.postswitch =
|
(fingerprints.asus-monitor name)
|
||||||
switches.setDPI {dpi = 110;}
|
];
|
||||||
// switches.setSoftwareBrightness {
|
config = lib.mkMerge [
|
||||||
|
configs.allOff
|
||||||
|
(configs.enableDevice name)
|
||||||
|
];
|
||||||
|
hooks.postswitch = lib.mkMerge [
|
||||||
|
(switches.setDPI {dpi = 110;})
|
||||||
|
(switches.setSoftwareBrightness {
|
||||||
device = name;
|
device = name;
|
||||||
brightness = 1;
|
brightness = 1;
|
||||||
}
|
})
|
||||||
// switches.setDDCBrightness {
|
(switches.setDDCBrightness {
|
||||||
modelName = "VG27AQL3A";
|
modelName = "VG27AQL3A";
|
||||||
brightness = 0;
|
brightness = 0;
|
||||||
}
|
})
|
||||||
// switches.setDDCContrast {
|
(switches.setDDCContrast {
|
||||||
modelName = "VG27AQL3A";
|
modelName = "VG27AQL3A";
|
||||||
contrast = 0.5;
|
contrast = 0.5;
|
||||||
};
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue