Skip to main content

GNOME Night Light Keyboard Shortcut

· 3 min read
Shafi Rayhan

As we all know, our electronic devices screens emits blue light which is bad for our eyes.

Nowadays almost every operating system ships with built in protection against blue light.

In this guide I will show you how to make the night light filter of GNOME DE super accessible.

How to Setup the Night Light Keyboard Shortcut in GNOME?

  1. Open your systems Settings application. Either press the SUPER key and type settings or press SUPER + A and look for the Settings application.
  2. Now scroll through the left sidebar of your Settings application until you see a list item named Keyboard. Click on it.
  3. Scroll down and you'll find a section named Keyboard Shortcuts. Click on the button that says View and Customize Shortcuts. Click on it.
  4. Scroll to the very bottom of the new modal screen that popped up after your last action.
  5. You'll see an item named Custom Shortcuts. Click on it.
  6. Click on the plus icon button on the new screen and a new modal titled Add Custom Shortcut will show up.
  7. Enter an appropriate name for the shortcut in Name input field. Example: Turn Night Light On.
  8. Now in the Command input field, enter this command:
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true
  1. Set a keyboard shortcut by clicking on the Set Shortcut button. For example: SUPER + N.
  2. Now that we are able to turn on our night light with our keyboard, we should repeat the steps 1 to 7 and then follow the remaining steps to setup a turn off method using our keyboard.
  3. Add this command in input:
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled false
  1. And finally add the keyboard shortcut. For example: SUPER + SHIFT + N

It's Not Working!

It may not work when you try out the shortcut you just set. Well, this is because by default GNOME set's the Night Light Preference to work from sundown till sunrise. So where you're from, the sun probably hasn't sat yet.

You need to manually override this preference, to do that, open Settings again, but this time look for the Display item in the left sidebar. Once you click it, you'll see two different tabs in the main pan; One of them reads Night Light! Click that and the night light configurations will appear. Here, select the night light schedule to be manual and set the time range to be 8PM to 8PM, doing this will ensure that your night light is always active!

Now whenever you press SUPER + N (or the shortcut that you set) the night light will turn on. And to turn it off press SUPER + SHIFT + N (or the shortcut that you set to turn it off).