snips/dwl.service

38 lines
910 B
Desktop File

# Systemd service to start DWL
# ----------------------------------------------------------
#
# Put this file in following directory:
#
# ~/.config/systemd/user
#
# Start this service with something like this:
#
# #
# #!/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}
#
[Unit]
Description=DWL session service
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target
[Service]
Type=oneshot
Environment=XDG_RUNTIME_DIR=%I
Environment=DWL_TAGS_FILE=%I/dwl.tags
Environment=DWL_LOG_FILE=%I/dwl.log
ExecStart=/home/mahesh/bin/dwl.session %I
Restart=on-failure
RestartSec=1
TimeoutStopSec=10