wl-run (558B)
- #!/bin/sh
- # Wayland wrapper
- export GDK_BACKEND=wayland
- export QT_QPA_PLATFORM=wayland-egl
- export CLUTTER_BACKEND=wayland
- export SDL_VIDEODRIVER=wayland
- export MY_LOCKER=swaylock
- [ -z "${XDG_RUNTIME_DIR}" ] && ( echo "$0"': Error: XDG_RUNTIME_DIR undefined, exiting…' 1>&2; exit 1 )
- [ -z "$*" ] && ( echo "$0"': Nothing to execute, exiting…' 1>&2; exit 0 )
- name="$(sed 's/[^a-z]//g' <<<$1)"
- uptime="$(cut -d' ' -f1 /proc/uptime)"
- echo 'wl-run_'"$uptime"'_'"$name"'.log' >&2
- "$@" 2>&1 | tee "${XDG_RUNTIME_DIR}"'/wl-run_'"$uptime"'_'"$name"'.log' 2>&1