Created
March 5, 2018 22:11
-
-
Save MeLlamoPablo/ad0ef88a326f0f90e969c1e747f60298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
current_temperature=$(gsettings get \ | |
org.gnome.settings-daemon.plugins.color \ | |
night-light-temperature \ | |
| sed 's/uint32 //g') | |
if [[ $1 = "up" ]]; then | |
new_temperature=$(($current_temperature + 100)) | |
else | |
new_temperature=$(($current_temperature - 100)) | |
fi | |
gsettings set \ | |
org.gnome.settings-daemon.plugins.color \ | |
night-light-temperature \ | |
${new_temperature} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment