KDE Plasma 5 doesn’t have an automatic night-mode, which is disappointing, but understandable, given that most KDE users aren’t begging developers to add this feature in large numbers. So, if you’re itching to have your KDE desktop automatically transition from light to dark themes depending on the time of day, you’ll need to make use of the Yin-Yang application to set up auto night mode in KDE.
Note: Though this post focuses on KDE Plasma 5, Yin-Yang works with other desktop environments too. More information on the official page.
Install Yin-Yang on Linux
The Yin-Yang application comes distributed as an AppImage. The reason the developers have gone with this method of distribution is that the program will not have to be compiled. Instead, download the file, make a couple of tweaks and go.
Getting the Yin-Yang AppImage from GitHub is best done with the wget downloader application. To use it, launch a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, use the wget command to get the latest AppImage release of the app.
Note: don’t want to deal with AppImage? There is also a single executable binary available for the Yin-Yang application. Grab it here.
After the app is done downloading, it’s time to make a new folder with the “AppImages” label. This folder is necessary so that we can put the Yin-Yang application somewhere safe, and protect it from accidental deletion.
To create the new “AppImages” folder, use the mkdir command.
mkdir -p ~/AppImages
With the new folder created for Yin-Yang, use the mv command to move the file into it.
mv Yin-Yang.AppImage ~/AppImages/
Enter the “AppImages” folder with the CD command.
Finally, finish up the installation process of the Yin-Yang application by updating the file’s permission set.
chmod +x Yin-Yang.AppImage
If the AppImage release of the Yin-Yang application is giving you issues, try downloading the source code.
To get the source code, as well as the instructions on how to build Yin-Yang from scratch, head over to the “Building” page on the developer’s GitHub.
Configure auto night mode on KDE
Configuring KDE to run night mode with Yin-Yang, you must first open up the Yin-Yang AppImage. There are two ways to do this: the terminal or the file manager.
To open up the application through the terminal window, use the CD command and move your session to the ~/AppImages folder.
Once in the AppImages folder, run the app for the first time with:
Or, open it up in the KDE Dolphin file manager by clicking on the “AppImages” folder, followed by the Yin-Yang AppImage file.
When the app is open, it’s time to configure dark mode. To instantly switch between modes, find the “Light” and “Dark” button. Click one of them to transition instantly.
Alternatively, to schedule when your KDE Plasma 5 desktop environment switches from light and dark, find the “scheduled” button and click it with the mouse.
After selecting the “scheduled” button, locate the “Light” and “Dark” boxes. Change the times that you’d like to see your PC switch between themes.
Please note that the schedule area of Yin-Yang works with the 24-hour time format. If you have issues writing or understanding time in this way, do yourself a favor and check out this page here. It will help you convert 24-hour time to a traditional 12 hour time.
Yin-Yang supports using different wallpapers depending on the theme you’re using (light/dark). To set individual wallpapers to switch to when Yin-Yang is running, do the following.
First, open up the app and find the “Settings” button. Then, go into the settings area and make your way to the bottom of the app and find “Wallpaper.”
Click on the “Light” or “Dark” buttons to open up a file browser. From there, use the file browser to navigate to the wallpaper image file you’d like to use for that mode.
Use Yin-Yang with VSCode
The Yin-Yang application can work with Microsoft’s Visual Studio Code so that it automatically switches between light and dark themes like the rest of your KDE desktop.
To enable this feature, click on “Settings” in the app window. From there, locate the option “VSCode” and check the box next to it.
Use Yin-Yang with Atom
Yin-Yang supports changing the appearance within GitHub’s Atom code editor. To enable this feature, open up Yin-Yang and click the “Settings” button.
In the settings area, scroll down and look for the “Atom” section, and check the box next to it to enable the feature.
The Yin-Yang application has a lot of settings that let users configure and tweak how both Light and Dark modes work in the app. To gain access to these settings, click on the “Settings” button and go through the list of options that appeal to you.