From 01fcf0ad071e5972004abd7ecb41907386342d94 Mon Sep 17 00:00:00 2001 From: DTB Date: Thu, 16 May 2024 00:23:48 -0600 Subject: [PATCH] weisu --- niceties/weisu | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 niceties/weisu 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 \ + "$@"