[feature] check for check for plasma-workspace (in progress 4)
This commit is contained in:
parent
7d29b4e766
commit
c450c07913
1 changed files with 12 additions and 4 deletions
|
|
@ -74,6 +74,17 @@ if ! command -v gsettings >/dev/null 2>&1; then
|
||||||
echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}"
|
echo -e "${red}==> ERROR:${all_off}${bold} ${mesg}${all_off}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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() {
|
check_config() {
|
||||||
if [[ ! -f $default_config_file ]]; then
|
if [[ ! -f $default_config_file ]]; then
|
||||||
|
|
@ -154,6 +165,7 @@ _set_theme() {
|
||||||
gsettings set org.gnome.desktop.interface color-scheme "$gtk_color_scheme"
|
gsettings set org.gnome.desktop.interface color-scheme "$gtk_color_scheme"
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme "$gtk_theme"
|
gsettings set org.gnome.desktop.interface gtk-theme "$gtk_theme"
|
||||||
gsettings set org.gnome.desktop.interface icon-theme "$icon_theme"
|
gsettings set org.gnome.desktop.interface icon-theme "$icon_theme"
|
||||||
|
/usr/lib/plasma-changeicons "$icon_theme" >/dev/null 2>&1
|
||||||
|
|
||||||
## GTK2
|
## GTK2
|
||||||
if [[ -w "$HOME/.gtkrc-2.0" ]]; then
|
if [[ -w "$HOME/.gtkrc-2.0" ]]; then
|
||||||
|
|
@ -195,10 +207,6 @@ _set_theme() {
|
||||||
sed -i "s,color_scheme_path=.*,color_scheme_path=$qt_color_scheme_path,g" \
|
sed -i "s,color_scheme_path=.*,color_scheme_path=$qt_color_scheme_path,g" \
|
||||||
"$HOME/.config/qt6ct/qt6ct.conf"
|
"$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
fi
|
fi
|
||||||
## workaround if plasma-workspace is installed
|
|
||||||
if [ -x "$(command -v /usr/lib/plasma-changeicon)" ]; then
|
|
||||||
/usr/lib/plasma-changeicons "$icon_theme"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch-dark-light() {
|
switch-dark-light() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue