Merge pull request #394 from ciricode/master

Refactor
This commit is contained in:
Vince 2021-08-15 11:37:15 +08:00 committed by GitHub
commit ae251bd833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -150,11 +150,11 @@ else
# rm -rf "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss" # rm -rf "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
if (is_my_distro "arch" || is_my_distro "void") && has_command xfce4-session; then if (is_running "xfce4-session"); then
msg="XFCE: you may need to logout after changing your theme to fix your panel opacity." msg="XFCE: you may need to run 'xfce4-panel -r' after changing your theme to fix your panel opacity."
elif (is_my_distro "solus") && has_command gnome-shell; then elif (is_my_distro "solus") && (is_running "gnome-session"); then
msg="GNOME: you may need to disable 'User Themes' extension to fix your dock." msg="GNOME: you may need to disable 'User Themes' extension to fix your dock."
elif (is_my_distro "debian") && [[ "${GNOME_VERSION}" == "old" ]]; then elif (is_running "gnome-session") && [[ "${GNOME_VERSION}" == "old" ]]; then
msg="GNOME: you may need to disable 'User Themes' extension to fix your logout and authentication dialog." msg="GNOME: you may need to disable 'User Themes' extension to fix your logout and authentication dialog."
fi fi

View File

@ -175,6 +175,10 @@ is_my_distro() {
[[ "$(cat '/etc/os-release' | awk -F '=' '/ID/{print $2}')" =~ "${1}" ]] [[ "$(cat '/etc/os-release' | awk -F '=' '/ID/{print $2}')" =~ "${1}" ]]
} }
is_running() {
pgrep "$1" &> /dev/null
}
############################################################################### ###############################################################################
# CORE UTILITIES # # CORE UTILITIES #
############################################################################### ###############################################################################