46 lines
2 KiB
Bash
46 lines
2 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# add a detection to prevent exec scripts on every login
|
|
#if [[ "$(darkman get)" =~ "light" ]] ; then
|
|
# Change the global Plasma Theme. On Manjaro you can use "org.manjaro.breath-dark.desktop"
|
|
# or you can create your own global Plasma Theme with the "Plasma Look And Feel Explorer".
|
|
# Reference: https://userbase.kde.org/Plasma/Create_a_Global_Theme_Package
|
|
#
|
|
# Since Plasma 5.26 the lookandfeeltool does not work anymore without "faking" the screen.
|
|
# Reference: https://bugs.kde.org/show_bug.cgi?id=460643
|
|
|
|
# Global Theme
|
|
lookandfeeltool -platform offscreen --apply "Utterly-Nord"
|
|
|
|
# Icon theme
|
|
/usr/lib/plasma-changeicons Papirus-Dark
|
|
|
|
# gtk4 theme
|
|
flatpak run --command="gradience-cli" com.github.GradienceTeam.Gradience apply -n "Nord-bluish" --gtk gtk4
|
|
|
|
# application style
|
|
# https://reddit.com/r/kde/comments/f7wemr/how_change_application_style_without_system/
|
|
kwriteconfig6 --file kdeglobals --group KDE --key widgetStyle Lightly
|
|
|
|
# Window decoration
|
|
# https://askubuntu.com/questions/1183294/switching-plasma-theme-from-the-command-line
|
|
kwriteconfig6 --file ~/.config/kwinrc --group org.kde.kdecoration2 --key library org.kde.klassy
|
|
|
|
kwriteconfig6 --file ~/.config/kwinrc --group org.kde.kdecoration2 --key theme Klassy
|
|
|
|
# cursorTheme
|
|
# https://askubuntu.com/questions/1025338/how-can-i-set-the-cursor-theme-on-kde-plasma-5-programmatically
|
|
kwriteconfig6 --file ~/.config/kcminputrc --group Mouse --key cursorTheme Bibata-Modern-Ice
|
|
|
|
# make kwin to reload config
|
|
# https://invent.kde.org/plasma/kwin/-/blob/master/src/kcms/decoration/kwin-applywindowdecoration.cpp#L95
|
|
# https://develop.kde.org/docs/plasma/kwin/#installation
|
|
dbus-send --session --type=signal /Kwin org.kde.KWin.reloadConfig
|
|
qdbus org.kde.KWin /KWin org.kde.KWin.reconfigure
|
|
|
|
|
|
# notify
|
|
notify-send --app-name="darkman" --urgency=low --icon=weather-clear "theme switch success. to make them fully take effect, please logout and login again."
|
|
#else
|
|
# echo "The global theme has been already switched, skipping"
|
|
#fi
|