Last active
May 29, 2022 10:49
-
-
Save Hiradur/89e31174ba2bd1bffcdc8b7299a29480 to your computer and use it in GitHub Desktop.
Shell script to toggle between light and dark theme for GTK and QT applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# toggle_theme_gtk_qt.sh | |
# Original author: Hiradur | |
# License: CC0 | |
# This script toggles between light and dark theme for GTK and QT applications | |
if [ $(gsettings get org.gnome.desktop.interface gtk-theme) = "'Adwaita-dark'" ]; then | |
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita" | |
sed -i 's/style=Adwaita-Dark/style=Adwaita/g' .config/qt5ct/qt5ct.conf | |
else | |
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" | |
sed -i 's/style=Adwaita/style=Adwaita-Dark/g' .config/qt5ct/qt5ct.conf | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment