Skip to content

Instantly share code, notes, and snippets.

@MeLlamoPablo
Created March 5, 2018 22:11
Show Gist options
  • Save MeLlamoPablo/ad0ef88a326f0f90e969c1e747f60298 to your computer and use it in GitHub Desktop.
Save MeLlamoPablo/ad0ef88a326f0f90e969c1e747f60298 to your computer and use it in GitHub Desktop.
#!/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