The new EricMartindale.com is an experiment in data aggregation, and might have a few bugs. Feel free to explore, and then provide feedback directly to @martindale.

search results for crontab

Auto-Dim Your Display at Night [Linux]

If you're at all like me, you often find yourself tapping away late at night on some project that you just need to hammer out those last few lines before you get to bed. Inevitably, that just doesn't happen.

So, I came up with the following solution subtly remind me that I really should be going to sleep (or hey, at least make the LCD easier on my eyes while I'm working!):

Edit the crontab for your root user using crontab -e. Add the following: 0 22 echo -n "0" > /proc/acpi/video/VGA/LCD0/brightness # dims LCD to 0% at 10 PM 0 7 echo -n "100" > /proc/acpi/video/VGA/LCD0/brightness # brightens LCD to 100% at 7 AM (all-nighter time!)

You can test either of these commands from the command line directly; you'll also need to make sure the path to your LCD's brightness setting is correct.

0 Replies

Replies are automatically detected from social media, including Twitter, Facebook, and Google+. To add a comment, include a direct link to this post in your message and it'll show up here within a few minutes.