2021-05-26 05:23:50 +00:00
|
|
|
# Systemd service to start DWL
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2021-05-26 05:23:50 +00:00
|
|
|
#
|
|
|
|
# Put this file in following directory:
|
|
|
|
#
|
|
|
|
# ~/.config/systemd/user
|
|
|
|
#
|
|
|
|
# Start this service with something like this:
|
|
|
|
#
|
2021-05-29 22:40:00 +00:00
|
|
|
# #
|
2021-05-26 05:23:50 +00:00
|
|
|
# #!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# # Start DWL
|
2021-05-26 05:43:12 +00:00
|
|
|
# RUNTIME_DIR=$(mktemp --directory --suffix=.${USER})
|
2021-05-26 05:23:50 +00:00
|
|
|
#
|
2021-05-29 22:40:00 +00:00
|
|
|
# # 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} && \
|
2021-05-26 05:43:12 +00:00
|
|
|
# rm -rf ${RUNTIME_DIR}
|
2021-05-26 05:23:50 +00:00
|
|
|
#
|
|
|
|
[Unit]
|
2021-05-29 22:40:00 +00:00
|
|
|
Description=DWL session service
|
2021-05-26 05:23:50 +00:00
|
|
|
BindsTo=graphical-session.target
|
|
|
|
Wants=graphical-session-pre.target
|
|
|
|
After=graphical-session-pre.target
|
|
|
|
|
|
|
|
[Service]
|
2021-05-26 05:43:12 +00:00
|
|
|
Type=oneshot
|
2021-05-29 22:40:00 +00:00
|
|
|
Environment=XDG_RUNTIME_DIR=%I
|
|
|
|
Environment=DWL_TAGS_FILE=%I/dwl.tags
|
|
|
|
Environment=DWL_LOG_FILE=%I/dwl.log
|
2021-05-29 23:08:06 +00:00
|
|
|
Environment=DWLTAGS_FMT=DZEN
|
|
|
|
ExecStart=/home/mahesh/bin/dwl.session
|
2021-05-26 05:23:50 +00:00
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=1
|
|
|
|
TimeoutStopSec=10
|