Support for multiple instances of DWL

This commit is contained in:
Mahesh Asolkar 2021-05-25 22:43:12 -07:00
parent b794ef8737
commit 3adcb1e58b
2 changed files with 6 additions and 4 deletions

View File

@ -10,9 +10,11 @@
# #!/usr/bin/env bash # #!/usr/bin/env bash
# #
# # Start DWL # # Start DWL
# RUNTIME_DIR=$(mktemp --directory --suffix=.${USER})
# #
# systemctl --user import-environment && \ # systemctl --user import-environment && \
# systemctl --wait --user start dwl.service # systemctl --wait --user start dwl@${RUNTIME_DIR}.service && \
# rm -rf ${RUNTIME_DIR}
# #
[Unit] [Unit]
Description=DWL service Description=DWL service
@ -21,9 +23,9 @@ Wants=graphical-session-pre.target
After=graphical-session-pre.target After=graphical-session-pre.target
[Service] [Service]
Type=simple Type=oneshot
EnvironmentFile=-%h/.config/dwl/env EnvironmentFile=-%h/.config/dwl/env
ExecStart=/home/mahesh/bin/dwl.session ExecStart=/home/mahesh/bin/dwl.session %I
Restart=on-failure Restart=on-failure
RestartSec=1 RestartSec=1
TimeoutStopSec=10 TimeoutStopSec=10

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export XDG_RUNTIME_DIR=$(mktemp --directory --suffix=.${USER}) export XDG_RUNTIME_DIR=$1
echo $XDG_RUNTIME_DIR used for Wayland session echo $XDG_RUNTIME_DIR used for Wayland session
export WLR_LIBINPUT_NO_DEVICES=1 export WLR_LIBINPUT_NO_DEVICES=1