From 22bd6b2e14889b5a39efc92f06d99f475634aefb Mon Sep 17 00:00:00 2001 From: Muhammad Rivan Date: Wed, 21 Apr 2021 15:39:47 +0700 Subject: [PATCH] Update XFCE things --- install.sh | 20 +++++++++++++------- lib-core.sh | 9 ++++++--- lib-install.sh | 6 +++--- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 671ace6..4988d0e 100755 --- a/install.sh +++ b/install.sh @@ -104,7 +104,7 @@ if [[ "${uninstall}" == 'true' ]]; then remove_themes prompt -s "Done! All '${name}' themes has been removed." else - install_theme_deps + install_theme_deps; echo if [[ "${interactive}" == 'true' ]]; then show_panel_opacity_dialog; show_sidebar_size_dialog; show_nautilus_style_dialog @@ -123,13 +123,19 @@ else prompt -i "Alt variants : $( IFS=';'; echo "${alts[*]}" )" prompt -i "Icon variant : ${icon}" prompt -i "Nautilus variant : ${nautilus_style}" - echo; install_themes - # if [[ "$(which xfce4-session 2> /dev/null)" ]]; then - # msg="XFCE: you may need to logout after changing your theme to fix your panel opacity." - # fi + echo; install_themes; echo; prompt -s "Done!" - echo; prompt -s "Done!"; echo; prompt -w "${msg}"; echo + if [[ "${DISTRO_BASE}" == "arch" && "$(which xfce4-session 2> /dev/null)" ]]; then + msg="XFCE: you may need to logout after changing your theme to fix your panel opacity." + notif_msg="${msg}\n\n${final_msg}" - [[ -x /usr/bin/notify-send ]] && notify-send "'${name}' theme has been installed. Enjoy!" "${msg}" -i "dialog-information-symbolic" + echo; prompt -w "${msg}" + else + notif_msg="${final_msg}" + fi + + echo; prompt -w "${final_msg}"; echo + + [[ -x /usr/bin/notify-send ]] && notify-send "'${name}' theme has been installed. Enjoy!" "${notif_msg}" -i "dialog-information-symbolic" fi diff --git a/lib-core.sh b/lib-core.sh index 7282d4a..da41589 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -18,6 +18,7 @@ else LIB_CORE_IMPORTED="true"; fi export WHITESUR_PID=$$ MY_USERNAME="$(logname 2> /dev/null || echo ${SUDO_USER:-${USER}})" +DISTRO_BASE="$(cat '/etc/os-release' | awk -F '=' '/ID_LIKE/{print $2}')" if command -v gnome-shell &> /dev/null; then if (( $(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f 1) >= 4 )); then @@ -121,7 +122,9 @@ dash_to_dock="false" max_round="false" # Misc -msg="Run '${0} --help' to explore more customization features!" +msg="" +final_msg="Run '${0} --help' to explore more customization features!" +notif_msg="" error_msg="" process_ids=() ANIM_PID="0" @@ -488,8 +491,8 @@ userify() { } sig_c() { - kill -13 "${process_ids[@]}" &> /dev/null - stop_animation; wait "${process_ids[@]}"; operation_canceled + kill -13 ${process_ids[*]} &> /dev/null + stop_animation; wait ${process_ids[*]} &> /dev/null; operation_canceled } operation_canceled() { diff --git a/lib-install.sh b/lib-install.sh index 40eb2f4..ba6f8fe 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -117,7 +117,7 @@ install_darky() { install_xfwmy() { local color="$(destify ${1})" - local TARGET_DIR="${dest}/${name}${color}-mdpi" + local TARGET_DIR="${dest}/${name}${color}" local HDPI_TARGET_DIR="${dest}/${name}${color}-hdpi" local XHDPI_TARGET_DIR="${dest}/${name}${color}-xhdpi" @@ -329,7 +329,7 @@ install_themes() { done done - wait "${process_ids[@]}" + wait ${process_ids[*]} &> /dev/null stop_animation } @@ -347,7 +347,7 @@ remove_themes() { done done - wait "${process_ids[@]}" + wait ${process_ids[*]} &> /dev/null } install_gdm_theme() {