Change Shell / GTK Theme To Dark Variant When GNOME Night Light Is On

GNOME Night Light with Dark Mode

The Night Light feature was introduced with GNOME 3.24, and it's used to make your display switch to a warmer color in the evening, helping you sleep better and prevent eye strain.

You can enable the GNOME Night Light option from Settings -> Displays -> Night Light -- you can choose to have it run automatically based on sunset / sunrise times or enable it on a manual schedule, and you can also control the color temperature.

If you'd like to extend the Night Light functionality to automatically switch to the dark variant of the GTK, Shell and icon theme (and more!) you're using when Night Light kicks in, there's a GNOME Shell extension that does just that. When the Night Light is turned off (either by you or by the schedule you set in the GNOME Settings), the theme is switched back to the regular / light variant.

The extension is called Night Theme Switcher, and using it you get a combined Night Light and Dark Mode that's automatically set based on the sunset / sunrise times for the region you live in.

The extension can change the following based on the Night Light or a custom schedule:

  • GTK theme
  • GNOME Shell theme
  • Icon theme
  • Cursor theme
  • Backgrounds
  • Run commands


Night Theme Switcher can either use the settings you've entered in the built-in GNOME Night Light settings, make use of the location services, or it can have its own schedule. You can even trigger the theme change on demand, using a keyboard shortcut and / or a button. This is done through the extension settings, on the Schedule tab.

It's also worth noting that the extension can automatically switch the themes if it detects a normal and dark variant of the theme, for example if you have installed Adwaita and Adwaita-dark, Yaru and Yaru-dark, and so on. 

gnome shell night theme switcher

You also have the option of manually specifying the day and night theme variants, which is useful not only in case this extension doesn't automatically detect both variants of a theme, but also to allow you to use a different theme during the day and during the night (and not just a light/dark variant of a theme). This is done from the extension settings (open the Tweaks app, and on the Extensions tab, click on the gear icon next to the Night theme switcher extension), where you'll find individual settings for each supported theme type (GTK, Shell, Icon, Cursor, Backgrounds, and the option to run commands).

It's important to mention that for this extension to be able to change the GNOME Shell theme, you need to have the "User theme" extension installed and enabled on your system. E.g. on Ubuntu or Pop!_OS, install it using sudo apt install gnome-shell-extensions, then enable it using GNOME Tweaks or the GNOME Extensions app.

To install Night Theme Switcher, follow the GNOME Shell browser integration instructions if you haven't already, then go to the Night Theme Switcher page on the GNOME Extensions website. Next, click the OFF switch to the right-hand side of the extension name to turn it ON and install the extension.