Dark Mode

UUID: darkMode@linuxedo.com
Last edited:
3 months ago 2024-07-18, 21:15
Last commit: [26cf8d70] Add Catalan translations (#6216)

Easily switch between dark mode and light mode with one click.

README

Close

Dark Mode

Changing themes to switch between light mode and dark mode doesn't have to be a tedious task. Once you have configured the applet with your default light mode and dark mode themes & wallpaper, you can switch between the modes with a single click.

For more details and feature requests: Dark Mode in Cinnamon Desktop Environment

License: GPL-v3

Changelog

  • Sep 3, 2023
    • Add support to XDG Desktop Portal. This dark mode setting affects applications which support it and lets you choose between two options:
    • default: Let the applications decide
    • prefer-dark: Prefer Dark Mode
  • Jul 12, 2022
    • Fix configuration dialog not opening in some circumstances.
  • Apr 12, 2022
    • Fix desklet not working if local folders are missing
  • Nov 21, 2021
    • Change the desktop background.
  • Oct 28, 2021
    • Automatic mode switch based on time.
  • Oct 21, 2021
    • Stable release.

Log In To Comment!

34 Comments

Davide Zipeto
Davide Zipeto-2 months ago
Would it be possible to execute a bash command on entering/exit the night/day mode? For example, on day mode, switch off keyboard backline and turn it back on night mode.
gabysyr
gabysyr-3 months ago
Hi, Automatically switch mode not working I nedd to press manually everyday! Lmc 21.3
Parth Vyas
Parth Vyas-5 months ago
^ not changed
Parth Vyas
Parth Vyas-5 months ago
These applet does nice work of auto changing system theme based on time and gives uniform look and feel, however terminal (GNOME terminal) and cursor theme (Light: Bibata-Modern-Ice & Dark: Bibata-Modern-Classic) are changed during this switch, so I made shell script for both terminal and cursor to change according to system theme. ```sh # terminal-theme-switch.sh #!/bin/zsh THEME=$(gsettings get org.cinnamon.desktop.interface gtk-theme) if [[ $THEME == *"Dark"* ]]; then dconf load /org/gnome/terminal/legacy/profiles:/ < dark-profile.dconf else dconf load /org/gnome/terminal/legacy/profiles:/ < light-profile.dconf fi ``` ```sh # cursor-theme-switch.sh #!/bin/zsh current_theme=$(gsettings get org.cinnamon.desktop.interface gtk-theme) current_theme=${current_theme//\'/} declare -A cursor_themes cursor_themes=( ["Mint-Y-Blue"]="Bibata-Modern-Ice" ["Mint-Y-Dark-Blue"]="Bibata-Modern-Classic" ) cursor_theme=${cursor_themes[$current_theme]} gsettings set org.cinnamon.desktop.interface cursor-theme "$cursor_theme" ``` Add these scripts to crontab entry and desktop autostart entry to switch theme automatically. It would be great to add similar solution to this applet.
| Asif Ansari | आसिफ़ अंसारी |
Great applet but there is something missing. What I did is I set two different folders of light and dark theme wallpapers. Each of them contains many wallpapers suitable for dark and light mode. Unfotunately, the wallpaper doesn't change. I expect it to change after a min or 2 min or at custom time. But It only picked the first picture from the selected folder and do not change automatically. Rest features are fine. No issues. Just this is the one thing which I desire.
Iván Legrán
Iván Legrán-5 months ago
Thanks for this applet, it's fantastic
Andrei Miculita
Andrei Miculita-5 months ago
Agreed with Sudo Shindo, it should be possible to select just 1 image for the background instead of a folder. Or at least make it clearer in the UI that a random background will be selected from that folder.
Vanille Angeles
Vanille Angeles-5 months ago
Thanks for this applet. A question: is there a method to call the applet manually with parameters ? I would like to do it by crontab depending the season, location and sun and to submit the right theme when the PC start. It's a similar question of lobster4all. Thanks.
lobster4all
lobster4all-6 months ago
Thats what I was looking for, thank you very much! Please try to fix the problem others pointed out about the applet not working when PC sleeps
Fubero8
Fubero8-8 months ago
Hello, thank you for this applet. Unfortunately, on LMDE 6 it does not switch according to the set time. I have to switch manually unfortunately. Does anyone have this error too?
Sudo Shindo
Sudo Shindo-9 months ago
Suggestion: Make the background specific/explicit instead of random. Setting up a light/dark wallpaper pair is kind of a hassle because you have to make 2 directories containing only 1 image each. It might be better if you get rid of the "random selection" part of the code so that the wallpaper files are easier to manage for users. It would allow us to have a /wallpapers/sunset dir that contains sunset-dark.png and sunset-light.png instead of /wallpapers/dark/sunset.png and /wallpapers/light/sunset.png and we could even avoid using subdirectories if we wanted to since we could specify the exact image paths.
Michał D
Michał D-1 year ago
Thanks for this useful applet! It would be great if the theme switched automatically if my laptop was asleep during transition time. E.g. I set the light mode to start at 6 AM, but I wake up my laptop at 8 AM - currently the theme remains dark from yesterday evening and I have to manually switch to light. Would be great if that happened automatically.
neek
neek-1 year ago
Great applet. One small request - the window border, window control, and desktop themes in ~/.themes can all be selected in the applet, but not the icon themes in ~/.icons (only the icon themes in /usr/share/icons). Are you able to give us access to icon themes in ~/.icons too? Cheers
neek
neek-1 year ago
Actually, you can also select icons themes from /.local/share/icons . I think ~/.icons is associated with freedesktop.org themes. Regardless, it is one of the places the Cinnamon theme manager looks for icons, and it would be nice to have this directory added.
unalignedcoder
unalignedcoder-1 year ago
Excellent applet, the only thing missing is a "next background" command. Since the user can set a wallpaper folder for the theme, which is ideal, the next logical step is to allow the user to manually flip through the backgrounds.
mash-00
mash-00-1 year ago
Hello and thank you very much for this. It is one of the best applets out there :-)! Something I noticed similar to appoloin; when e.g. a notebook goes to sleep and wakes up past the scheduled start/end time of the automatic mode switch the change is not fired "again", hence the theme is not switched. Before I found this neat applet I used to simply add some .sh scripts in crontab along shortcuts to fire them manually and had actually the same issue. During my brief fixing research I found this link, maybe it could be useful for you and this applet as well: https://stackoverflow.com/questions/58405459/how-to-set-cronjob-on-wake-up-from-sleep BR
claudiux
claudiux-1 year ago
Very useful applet! ...which I just discovered. Its author is also the author of the best desklet: googleCalendar. Thank you very much, @slgobinath
Yaroslav
Yaroslav-1 year ago
How to use in after downloading?
claudiux
claudiux-1 year ago
Open its settings...
richo
richo-1 year ago
Thanks a lot.
Andrei Miculita
Andrei Miculita-1 year ago
Works very nicely, thanks! Only thing I'd change is that clicking the applet should instantly change the theme, without opening a menu with just 1 option.
Jonathan Sanfilippo
Now Work in Arch Linux perfect !
Jonathan Sanfilippo
Arch dont work
Filip Fjeldstad
Filip Fjeldstad-2 years ago
Having trouble configuring it now... Any tips?
binarynoise
binarynoise-2 years ago
Please also toggle the libadwaita theme. With gnome migrating to libadwaita, half of the applications don't change their theme
Jyusup
Jyusup-2 years ago
thanx for fixing. doesn't work without ~/.local/share/icons folder on lmde 5 and debian
appoloin
appoloin-2 years ago
The auto change doesn't switch theme on resume. If you enter hibernation say on the dark theme and resume after the time for the light theme to be used, the applet doesn't switch.
Kalvez
Kalvez-2 years ago
Hi, still can't access the config menu on Linux Mint 20.3 :(
Jyusup
Jyusup-2 years ago
LMDE 5 doesn't work
Gobinath
Gobinath-2 years ago
This problem is fixed now. Please try again. Thanks
Jyusup
Jyusup-2 years ago
Linuxmint 20.3. Can't access configuration menu. On Fedora it works, please, help!
Gobinath
Gobinath-2 years ago
This problem is fixed now. Please try again. Thanks
dvoraking
dvoraking-2 years ago
In order to get working, you need to make the folder ~/.local/share/icons, which was missing from a fresh install of Mint. Found by DonLH.
nicholaspaquet
nicholaspaquet-2 years ago
Does nothing on Linuxmint 20.3. Can't access configuration menu either.