some other script tweaks

This commit is contained in:
pika 2025-06-09 12:46:15 +02:00
parent c3661ea5ce
commit 85c1e3be84
2 changed files with 17 additions and 13 deletions

View file

@ -5,6 +5,17 @@ command-exists() {
command -v "$@" >/dev/null 2>&1
}
kill-all() {
# ─< Kill already running processes >─────────────────────────────────────────────────────
hyprpanel="gjs" # since hyprpanel has so many different wordings, making it clear that this is currently the hyprpanel service name
_ps=(swaync gBar rofi fuzzel wofi swaync waybar $hyprpanel)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
}
SCRIPTS="$HOME/.config/hypr/.scripts"
# Logging helper
@ -121,15 +132,8 @@ init-xdg-portal() {
}
main() {
if command_exists swaync; then
pkill swaync
fi
if setup-desktop; then
log_notify "normal" "INFO" "System modules initialized."
else
log_notify "critical" "INFO" "System module initialization exited with errors.."
fi
kill-all
setup-desktop
if [ -x "/usr/lib/hyprpolkitagent" ]; then
systemctl --user start hyprpolkitagent