#!/usr/bin/env bash # Start DWL RUNTIME_DIR=$(mktemp --dry-run --suffix=.${USER}) # Escape slashes in the path # SNAME=$(systemd-escape $(basename ${RUNTIME_DIR}).service) SNAME=${USER}_${XDG_VTNR} export XDG_SESSION_CLASS=user echo "#################" echo "$XDG_RUNTIME_DIR" echo "#################" # Start service blocking. Remove runtime directory upon completion. # Be sure to import XDG session variables for graphical-session to work systemctl --user import-environment XDG_SEAT && \ systemctl --user import-environment XDG_SESSION_TYPE && \ systemctl --user import-environment XDG_SESSION_CLASS && \ systemctl --user import-environment XDG_VTNR && \ systemctl --user import-environment XDG_RUNTIME_DIR && \ systemctl --user import-environment XDG_SESSION_ID && \ systemctl --wait --user start dwl@${SNAME} # && \ # rm -rf ${RUNTIME_DIR}