2021-05-27 19:55:23 +05:00

14 lines
282 B
Bash

#!/bin/bash
if ! hash lxpanelctl 2> /dev/null; then
exit 0
fi
CMD="lxpanelctl command volumealsabt start > /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