logo

dotfiles

My dotfiles, one branch per machine, rebased on base

wl-run (558B)


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