bugfix: more QT checking
- check for QT_QPA_PLATFORMTHEME=qt6ct
- make plasma-changeicons optional
This commit is contained in:
parent
16f3a541dd
commit
216f3866cb
1 changed files with 25 additions and 12 deletions
|
|
@ -51,6 +51,28 @@ 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' \
|
||||
|
|
@ -74,17 +96,6 @@ 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
|
||||
|
|
@ -167,7 +178,9 @@ _set_theme() {
|
|||
gsettings set org.gnome.desktop.interface icon-theme "$icon_theme"
|
||||
|
||||
## QT
|
||||
/usr/lib/plasma-changeicons "$icon_theme" >/dev/null 2>&1
|
||||
if [[ -x /usr/lib/plasma-changeicons ]]; then
|
||||
/usr/lib/plasma-changeicons "$icon_theme" >/dev/null 2>&1
|
||||
fi
|
||||
if [[ -w "$HOME/.config/qt5ct/qt5ct.conf" ]]; then
|
||||
sed -i "s/icon_theme=.*/icon_theme=$icon_theme/g" \
|
||||
"$HOME/.config/qt5ct/qt5ct.conf"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue