3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-22 15:15:53 +00:00

14 lines
280 B
Bash

#!/bin/bash
if ! hash lxpanelctl 2> /dev/null; then
exit 0
fi
CMD="lxpanelctl command volumealsabt stop >/dev/null"
for PID in $(pgrep -x lxpanel); do
eval "$(grep -z "DISPLAY=" "/proc/$PID/environ" | tr -d '\0')"
user="$(ps -p "$PID" -o uname=)"
su "$user" -c "$CMD"
done