Fixes pw_exit_tray

This commit is contained in:
Htylol 2025-04-08 00:41:12 +05:00
parent 4e960fe086
commit 9cea076f5d

@ -1931,15 +1931,10 @@ pw_kill_autostart () {
export -f pw_kill_autostart export -f pw_kill_autostart
pw_exit_tray () { pw_exit_tray () {
if [[ "$XDG_SESSION_TYPE" == "tty" || "$(readlink -f /bin/sh)" == *"/dash" ]] ; then read -r -a PGREP_TRAY_GUI_PP < <(pgrep -a tray_gui_pp)
if [[ -n "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then [[ -n ${PGREP_TRAY_GUI_PP[0]} ]] && kill -s SIGUSR1 "${PGREP_TRAY_GUI_PP[0]}" 2>/dev/null
kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" read -r -a PGREP_YAD_GUI_PP < <(pgrep -a yad_gui_pp)
fi [[ -n ${PGREP_YAD_GUI_PP[0]} ]] && kill -s SIGUSR1 "${PGREP_YAD_GUI_PP[0]}" 2>/dev/null
else
if [[ -n "$(pgrep -a tray_gui_pp)" ]] ; then
kill -s SIGUSR1 $(pgrep -a tray_gui_pp) 2>/dev/null
fi
fi
} }
export -f pw_exit_tray export -f pw_exit_tray