snips/start.dwl

12 lines
300 B
Plaintext
Raw Normal View History

2021-05-29 22:40:00 +00:00
#!/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}