Initial commit

This commit is contained in:
Alexander Gehrke 2019-09-30 14:49:14 +02:00
commit cefd40b6dc
31 changed files with 1028 additions and 0 deletions

17
bin/dbus-find Executable file
View file

@ -0,0 +1,17 @@
#!/bin/zsh
if [[ $1 == "-u" ]]; then
USER=$2
SUDO="sudo -u $USER"
shift 2
else
SUDO=
fi
export "$({for i in $(pgrep -u $USER dbus-daemon); grep -z DBUS_SESSION_BUS_ADDRESS /proc/$i/environ} | head -n 1)"
if [[ -z $DBUS_SESSION_BUS_ADDRESS ]]; then
echo "No DBUS found"
exit 1
else
exec $=SUDO "$@"
fi