[Question] How can I dim screen after 20s inactivity when running on battery? tlp/sway/arch/chromebook

I think this could save me some battery time. I checked tlp but could not find anything related. In Sway config with swayidle maybe? All help appreciated.

8 points · 5 comments · view on lemmy.world

5 Comments

JustineSmithies@lemmy.world · 4 pts · 3y (2 replies)

You could use swayidle and add a line to use either light or brightnessctl to dim and restore the brightness. Or just as I do turn off display after a certain time. This link should give you an idea. https://wiki.archlinux.org/title/Sway#Idle

rkk@lemmy.world · 3 pts · 3y (1 reply)

Brightnessctl is installed and works just need a way to read whether is on ac or battery.

eshep@social.trom.tf · 1 pts · 3y

@JustineSmithies @rkk Should be able to read it from /sys/devices/ or with upower.

whRQla8GEMdqXW2OVCbS@lemmy.blahaj.zone · 2 pts · 3y (1 reply)

Are you running arch on the metal or through crostini/crouton? The second option probably will only respect chromeos' power management settings, but you may be able to flash a full uefi payload and get rid of chromeos completely with https://mrchromebox.tech/#fwscript

rkk@lemmy.world · 2 pts · 3y

Yeah, i got all that (coreboot+arch)