diff --git a/niceties/weisu b/niceties/weisu new file mode 100755 index 0000000..91155bf --- /dev/null +++ b/niceties/weisu @@ -0,0 +1,16 @@ +#!/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 \ + "$@"