Sean Wang 406190b624 Extension: Update Chinese (Traditional) translation using Weblate
Currently translated at 97.5% (40 of 41 strings)

Translation: Night Theme Switcher/Extension
Translate-URL: https://hosted.weblate.org/projects/night-theme-switcher/extension/zh_Hant/
2022-11-23 04:47:41 +01:00
2021-08-17 16:02:05 +02:00
2022-06-17 09:11:47 +02:00
2021-08-20 15:39:20 +02:00
2022-02-18 13:24:25 +01:00
2022-10-28 12:31:25 +02:00
2022-05-24 23:17:24 +02:00
2021-08-17 16:02:05 +02:00
2022-08-16 01:26:00 +02:00
2021-08-20 15:39:20 +02:00
2022-02-18 13:24:25 +01:00
2022-02-18 13:24:25 +01:00

Night Theme Switcher

Automatically toggle your desktops color scheme between light and dark, switch backgrounds and run custom commands at sunset and sunrise.


Table of contents


Graphical installation

Visit the extension page on extensions.gnome.org and enable the extension.

Command line installation

You will need these tools:

  • meson
  • gettext
  • glib-compile-schemas
  • glib-compile-resources

Clone the repository and enter the directory:

git clone https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension.git && cd nightthemeswitcher-gnome-shell-extension

Build and install using meson:

# System-wide installation
meson builddir && meson install -C builddir

# User installation
meson builddir --prefix=~/.local && meson install -C builddir

Restart your GNOME session and enable the extension:

gnome-extensions enable nightthemeswitcher@romainvigier.fr

Contributing

You're welcome to contribute to the code or the translations! See CONTRIBUTING.md.

Frequently asked questions

Some applications don't switch their appearance

Like GNOME's built-in dark mode, the extension switches the standard freedesktop.org color scheme preference. Older applications might not follow this preference.

It is possible to force a GTK theme in the extension preferences, but please note that this can visually break applications. It is better to ask the developers of the applications to support the standard preference.

Something doesn't work on Ubuntu

Unfortunately, Ubuntu ships heavily modified GNOME components to implement some features like accent colors. Because they did so in a very hacky way instead of working with upstream and other desktop projects on a proper solution, it results in a broken out of the box experience with the extension, which expects a standard environment. Not much can be done as I don't want to code workarounds on top of hacks.

To mitigate that, please:

  • Enable GTK theme switching in the extension preferences and choose the themes with your desired accent color
  • Enable Shell theme switching in the extension preferences and choose the themes with your desired accent color

You'll have to do that again whenever you want to change your accent color.

If after following these steps, something still isn't working, please open a new issue.

Switching happens too early/too late

There's a hidden setting to configure the offset (in hours) applied to the calculated sunrise and sunset times, you can change it with the gsettings command:

gsettings --schemadir ~/.local/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.time offset $DESIRED_OFFSET

I have disabled Location services but want to use sunrise and sunset times from my location

If you know your coordinates, you can enter them in a hidden setting, and the extension will use them to calculate the sunrise and sunset times. You can set it with the gsettings command:

gsettings --schemadir ~/.local/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.time location '($LATITUDE,$LONGITUDE)'
S
Description
GNOME Night Theme Switcher fork and release builds
Readme
7.6 MiB
2026.09.04.1
Latest
2026-09-04 09:56:52 +02:00
Languages
JavaScript 84.1%
CSS 6.1%
Meson 5.7%
Python 2%
HTML 1.6%
Other 0.5%