Add support for older KDE versions

This commit is contained in:
Dylan 2016-02-16 10:31:13 +11:00
parent 1b1bfa2dab
commit 0427eb3f05

16
fetch
View file

@ -1185,12 +1185,18 @@ getgtk () {
if type -p kde5-config >/dev/null 2>&1; then if type -p kde5-config >/dev/null 2>&1; then
kde_config_dir=$(kde5-config --localprefix) kde_config_dir=$(kde5-config --localprefix)
if [ -f "${kde_config_dir}/share/config/kdeglobals" ]; then elif type -p kde4-config >/dev/null 2>&1; then
kde_config_file="${kde_config_dir}/share/config/kdeglobals" kde_config_dir=$(kde4-config --localprefix)
gtk3theme=$(grep "^[^#]*$kde" "$kde_config_file") elif type -p kde-config >/dev/null 2>&1; then
gtk3theme=${gtk3theme/${kde}*=} kde_config_dir=$(kde-config --localprefix)
fi fi
if [ -f "${kde_config_dir}/share/config/kdeglobals" ]; then
kde_config_file="${kde_config_dir}/share/config/kdeglobals"
gtk3theme=$(grep "^[^#]*$kde" "$kde_config_file")
gtk3theme=${gtk3theme/${kde}*=}
fi fi
;; ;;