Created
July 3, 2018 20:30
-
-
Save kapad/bdbf5df735690afd8cd36225becf7304 to your computer and use it in GitHub Desktop.
Script to toggle the Gnome nightlight setting.
This file contains hidden or 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
#!/bin/bash | |
setting=$(gsettings get org.gnome.settings-daemon.plugins.color night-light-enabled) | |
if [[ $setting == "true" ]]; then | |
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled false | |
else | |
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the script, it's useful. Now i can activate night light just pressing
Super+N
. Instead using.sh filetype
, ichmod +x
the file moved it to custom folder in~/.local/share/myscript
create symlink of the file to/usr/local/bin
and name ittooglens
, set key shortcut on gnome setting toCtrl+Super+N
, modify the shortcut key usingdconf editor
toSuper+N
and voila.