mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
19 lines
584 B
Bash
Executable file
19 lines
584 B
Bash
Executable file
#!/bin/bash
|
|
# Refresh KDE sycoca cache for all logged-in users with KDE sessions
|
|
# This script is called by the pacman hook after KCM installation
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Find all users running kded6 (indicates active KDE session)
|
|
for pid in $(pgrep -x kded6); do
|
|
user=$(ps -o user= -p "$pid" 2>/dev/null | tr -d ' ')
|
|
if [ -n "$user" ] && [ "$user" != "root" ]; then
|
|
# Run kbuildsycoca6 as that user
|
|
su - "$user" -c "kbuildsycoca6 --noincremental" >/dev/null 2>&1 &
|
|
fi
|
|
done
|
|
|
|
# Wait for all background jobs
|
|
wait 2>/dev/null
|
|
|
|
exit 0
|