[FEATURE] Dark/light theme, toggle and automatic
Sorry I couldn't find any documentation regarding light mode. Is there one? If yes it would be nice to have a toggle for dark and light mode switching in waybar. And even better if it would change automatically. Settings could be daytime of location or simply setting light and dark mode hours. Additionally one could set up folder with light and folder with dark wallpapers.
BR Pandale
@pandalec Can you open nwg-look and set it to prefer-light (insead of dark):
Sorry for the late respoonse, currently I don't Hyprland ready installed for testing. Will give it a try next week! Thanks!
Hello,
I am currently using Stable Release 2.9.8.7 . The colors in 'general' change based on Matugen.
But I also want an explicit toggle to change GTK apps from light to dark and vice versa. So, I have created the following hyprland script to toggle light and dark theme and set it to CTRL+SUPER+D.
#!/bin/bash
# This script toggles between light and dark mode
# Function to set dark mode
set_dark_mode() {
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
}
# Function to set light mode
set_light_mode() {
gsettings set org.gnome.desktop.interface color-scheme 'prefer-light'
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
}
# Check current theme and toggle
current_scheme=$(gsettings get org.gnome.desktop.interface color-scheme)
if [[ "$current_scheme" == *"dark"* ]]; then
set_light_mode
else
set_dark_mode
fi
It works in general and able to change a lot of GTK-Apps like Edge/Firefox/Obsidian/Dolphin etc. Where it does not work is Core Gnome apps like Nautlius, Software etc.
They remain in dark always. Only way I found till now to set them to light and then toggle using above script is to remove the ~/.config/gtk-4.0/colors.css generated with Matugen.
But that's not an elegant solution. NWG-LOOK doesn't help either to change these core applications to light theme. I have even tried to set 'lighter wallpapers' . Other apps that are following Matugen become lighter but Nautilis still remain in Dark.
I am using Fedora 42. Can you please provide any alternate solution to this?
@codeRSH Great. I will test it and will see what’s possible.
The full dark/light toggle is now available in 2.9.9.1