17 lines
251 B
Plaintext
17 lines
251 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
set -x
|
||
|
|
||
|
# https://unix.stackexchange.com/a/709811
|
||
|
|
||
|
if test -n "$SUDO"
|
||
|
then command -v doas \
|
||
|
&& SUDO=doas \
|
||
|
|| SUDO=sudo
|
||
|
fi
|
||
|
|
||
|
exec $SUDO env \
|
||
|
WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" \
|
||
|
XDG_RUNTIME_DIR=/user/run/0 \
|
||
|
"$@"
|