Skip to content

Instantly share code, notes, and snippets.

@KeyboardInterrupt
Last active May 14, 2019 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KeyboardInterrupt/071ae413179acb9d6fb8f7692acff0af to your computer and use it in GitHub Desktop.
Save KeyboardInterrupt/071ae413179acb9d6fb8f7692acff0af to your computer and use it in GitHub Desktop.
Redshift and dim/undim your screens with easy to use commands.
#!/bin/bash
#
# This script can be used to set the Monitor temperatur and
# brightness to nighttime and eye friendly values
# Author: c.stein@keyboardinterrupt.com
# Usage:
# `dim.sh 1` = normal brightness
# `dim.sh .5` = half brightness
for display in $(xrandr --listmonitors | cut -d " " -f 6) ; do
xrandr --output $display --brightness ${1} --gamma 1:.8:.7
done
#!/bin/bash
# This script sets the brightness and gamma of every monitor to *normal* 1
# Usage:
# `undim.sh`
for display in $(xrandr --listmonitors | cut -d " " -f 6) ; do
xrandr --output $display --brightness 1 --gamma 1:1:1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment