To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 144d3d53 authored by Stefan Schindler's avatar Stefan Schindler
Browse files

Set brightness to max

parent 65ca46dc
......@@ -25,11 +25,14 @@ lazy_static! {
const WRITE_BUFFER_SIZE: usize = 4 * 1024;
fn main() {
let pool = threadpool::ThreadPool::new(2);
pool.execute(try_max_brightness);
let model = get_file_contents("/sys/devices/virtual/dmi/id/product_version");
println!("\n\n {} running on {}\n", BOLD.paint("wipe buddy"), BOLD.paint(model));
let disks = parse_disks();
let pool = threadpool::ThreadPool::new(2);
show_disk_status(&disks);
loop {
......@@ -451,6 +454,13 @@ fn wipe_disk(disk: &Arc<DiskInformation>) -> std::io::Result<std::time::Duration
}
fn try_max_brightness() {
let max = get_file_contents("/sys/class/backlight/intel_backlight/max_brightness");
replace_file_contents("/sys/class/backlight/intel_backlight/brightness", &max).expect("unable to set max brightness");
}
#[cfg(test)]
mod test {
use ::*;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment