snips/start.dwl

12 lines
300 B
Plaintext
Executable File

#!/usr/bin/env bash
# Start DWL
RUNTIME_DIR=$(mktemp --directory --suffix=.${USER})
# Escape slashes in the path
SNAME=$(systemd-escape ${RUNTIME_DIR}.service)
# Start service blocking. Remove runtime directory upon completion
systemctl --wait --user start dwl@${SNAME} && \
rm -rf ${RUNTIME_DIR}