mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium/autorandr: set contrast for external display
This commit is contained in:
parent
c93d7379ae
commit
75574d285f
1 changed files with 16 additions and 4 deletions
|
|
@ -75,7 +75,15 @@
|
||||||
brightness, # [0..1]
|
brightness, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_ddc_brightness" ''
|
singleton "10_ddc_brightness" ''
|
||||||
ddcutil --model ${modelName} setvcp 10 ${toString (brightness * 100)}
|
ddcutil --model ${modelName} setvcp 10 ${toString (builtins.floor (brightness * 100))}
|
||||||
|
'';
|
||||||
|
|
||||||
|
setDDCContrast = {
|
||||||
|
modelName, # obtain with `ddcutil detect`
|
||||||
|
contrast, # [0..1]
|
||||||
|
}:
|
||||||
|
singleton "10_ddc_contrast" ''
|
||||||
|
ddcutil --model ${modelName} setvcp 12 ${toString (builtins.floor (contrast * 100))}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -115,13 +123,17 @@
|
||||||
config = configs.allOff // configs.enableDevice name;
|
config = configs.allOff // configs.enableDevice name;
|
||||||
hooks.postswitch =
|
hooks.postswitch =
|
||||||
switches.setDPI {dpi = 110;}
|
switches.setDPI {dpi = 110;}
|
||||||
|
// switches.setSoftwareBrightness {
|
||||||
|
device = name;
|
||||||
|
brightness = 1;
|
||||||
|
}
|
||||||
// switches.setDDCBrightness {
|
// switches.setDDCBrightness {
|
||||||
modelName = "VG27AQL3A";
|
modelName = "VG27AQL3A";
|
||||||
brightness = 0;
|
brightness = 0;
|
||||||
}
|
}
|
||||||
// switches.setSoftwareBrightness {
|
// switches.setDDCContrast {
|
||||||
device = name;
|
modelName = "VG27AQL3A";
|
||||||
brightness = 1;
|
contrast = 0.5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue