This simple tutorial shows how to add a system tray menu option to switch between Dark and Light system mode in Ubuntu.
By default, the System Settings -> Appearance page offers options to choose Standard, Light, and Dark window colors. It however only apply the app theme.
For system menu, notifications, date and time menu, etc, you have to install user themes extension, and change the Gnome Shell theme individually via Gnome Tweak Tool.
Here I’m going to introduce a new Gnome Shell Extension called ‘Ubuntu Appearance‘. With it, you can toggle fully dark and light mode easily via a few clicks.
The extension features:
- Integrate Light, Dark, Standard option into system tray menu.
- Toggle fully dark / light mode, not only app window colors but also system theme (e.g., system menu, calendar, notifications.).
- Option name vary according to current system mode.
- The user themes extension is not required.
Install Ubuntu Appearance extension:
1.) Firstly, open terminal by pressing Ctrl+Alt+T on keyboard. When terminal opens, run command to install required packages:
sudo apt install chrome-gnome-shell gnome-shell-extension-prefs
2.) Secondly, go to the extension web page and click on the slider icon to install it.
Though the extension says for Gnome 40, it works well in my Ubuntu 20.04 and Ubuntu 21.04 machine.
Don’t see the toggle icon? Click the link ‘Click here to install browser extension’ to install browser extension and refresh the web page.
Once you installed the extension, the option should appear in system menu immediately. Log out and back in or restart Gnome Shell if you don’t see the option.