diff --git a/Makefile b/Makefile index 43dcb38..08fd05d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.0.05 +VERSION = 0.0.04 PN = night-theme-switcher PREFIX ?= /usr diff --git a/common/night-theme-switcher.in b/common/night-theme-switcher.in index 6c8ab79..89525a8 100755 --- a/common/night-theme-switcher.in +++ b/common/night-theme-switcher.in @@ -51,28 +51,6 @@ readonly all_off bold blue green red yellow ### End insert of Arch script # dependency checks probably not needed but they do not hurt -if [ ! "$QT_QPA_PLATFORMTHEME" == "qt6ct" ]; then - notify-send \ - 'Wrong environment variable' \ - 'Please set QT_QPA_PLATFORMTHEME=qt6ct.' \ - -h string:x-canonical-private-synchronous:sys-notify \ - -u critical \ - -i dialog-error - mesg="environment variable QT_QPA_PLATFORMTHEME=qt6ct is not set." - echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}" - exit 1 -fi -if ! command -v breeze-settings6 >/dev/null 2>&1; then - notify-send \ - 'Missing dependency' \ - 'Please install breeze.' \ - -h string:x-canonical-private-synchronous:sys-notify \ - -u critical \ - -i dialog-error - mesg="breeze is required to use this script." - echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}" - exit 1 -fi if ! command -v qt6ct >/dev/null 2>&1; then notify-send \ 'Missing dependency' \ @@ -96,6 +74,17 @@ if ! command -v gsettings >/dev/null 2>&1; then echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}" exit 1 fi +if ! command -v /usr/lib/plasma-changeicons >/dev/null 2>&1; then + notify-send \ + 'Missing dependency' \ + 'plasma-changeicons not found.\nPlease install plasma-workspace.' \ + -h string:x-canonical-private-synchronous:sys-notify \ + -u critical \ + -i dialog-error + mesg="plasma-workspace is required to use this script." + echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}" + exit 1 +fi check_config() { if [[ ! -f $default_config_file ]]; then @@ -178,9 +167,7 @@ _set_theme() { gsettings set org.gnome.desktop.interface icon-theme "$icon_theme" ## QT - if [[ -x /usr/lib/plasma-changeicons ]]; then - /usr/lib/plasma-changeicons "$icon_theme" >/dev/null 2>&1 - fi + /usr/lib/plasma-changeicons "$icon_theme" >/dev/null 2>&1 if [[ -w "$HOME/.config/qt5ct/qt5ct.conf" ]]; then sed -i "s/icon_theme=.*/icon_theme=$icon_theme/g" \ "$HOME/.config/qt5ct/qt5ct.conf" @@ -209,7 +196,7 @@ switch-dark-light() { qt_color_scheme_path=$kcolorscheme_dark _set_theme else - gtk_color_scheme=prefer-light + gtk_color_scheme=default gtk_prefer_dark_theme=0 gtk_theme=$gtk_theme_light icon_theme=$icon_theme_light @@ -225,7 +212,7 @@ restore-theme-on-login() { gtk_color_scheme=$(gsettings get org.gnome.desktop.interface color-scheme) if [[ ! $gtk_color_scheme == ''\''prefer-dark'\''' ]]; then - gtk_color_scheme=prefer-light + gtk_color_scheme=default gtk_prefer_dark_theme=0 gtk_theme=$gtk_theme_light icon_theme=$icon_theme_light diff --git a/common/nts.skel b/common/nts.skel index 4ad2dae..f98df54 100644 --- a/common/nts.skel +++ b/common/nts.skel @@ -5,13 +5,13 @@ kcolorscheme_light="/usr/share/color-schemes/BreezeLight.colors" kcolorscheme_dark="/usr/share/color-schemes/BreezeDark.colors" # Name of the light icon theme -icon_theme_light=breeze +icon_theme_light=Papirus # Name of the dark icon theme -icon_theme_dark=breeze-dark +icon_theme_dark=Papirus-Dark # Name of the light gtk theme -gtk_theme_light=Breeze +gtk_theme_light=adw-gtk3 # Name of the dark gtk theme -gtk_theme_dark=Breeze-Dark +gtk_theme_dark=adw-gtk3-dark