snips/dwl.service

48 lines
1.5 KiB
SYSTEMD
Raw Normal View History

# Systemd service to start DWL
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
#
2024-09-19 01:44:47 +00:00
# Symlink this file in following directory as follows:
#
2024-09-19 01:44:47 +00:00
# $ cd ~/.config/systemd/user
# $ ln -s <snips>/dwl.service dwl@.service
#
# Be sure to link it as a named service with (@.service)
#
# Start this service with something like this:
#
# #!/usr/bin/env bash
#
# # Start DWL
2021-05-26 05:43:12 +00:00
# RUNTIME_DIR=$(mktemp --directory --suffix=.${USER})
#
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.
# # 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_SESSION_ID && \
2021-05-29 22:40:00 +00:00
# systemctl --wait --user start dwl@${SNAME} && \
2021-05-26 05:43:12 +00:00
# rm -rf ${RUNTIME_DIR}
[Unit]
2021-05-29 22:40:00 +00:00
Description=DWL session service
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
2024-04-07 20:07:53 +00:00
Environment=XDG_CURRENT_DESKTOP=DWL
2023-12-25 19:31:27 +00:00
Environment=PIPEWIRE_RUNTIME_DIR=/run/user/501
2021-06-14 01:32:15 +00:00
ExecStart=%h/bin/dwl.session
Restart=on-failure
RestartSec=1
TimeoutStopSec=10