diff --git a/dwl.service b/dwl.service index 85a16fe..104c955 100644 --- a/dwl.service +++ b/dwl.service @@ -10,9 +10,11 @@ # #!/usr/bin/env bash # # # Start DWL +# RUNTIME_DIR=$(mktemp --directory --suffix=.${USER}) # # systemctl --user import-environment && \ -# systemctl --wait --user start dwl.service +# systemctl --wait --user start dwl@${RUNTIME_DIR}.service && \ +# rm -rf ${RUNTIME_DIR} # [Unit] Description=DWL service @@ -21,9 +23,9 @@ Wants=graphical-session-pre.target After=graphical-session-pre.target [Service] -Type=simple +Type=oneshot EnvironmentFile=-%h/.config/dwl/env -ExecStart=/home/mahesh/bin/dwl.session +ExecStart=/home/mahesh/bin/dwl.session %I Restart=on-failure RestartSec=1 TimeoutStopSec=10 diff --git a/dwl.session b/dwl.session index 75d642b..ab377f3 100755 --- a/dwl.session +++ b/dwl.session @@ -1,6 +1,6 @@ #!/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 export WLR_LIBINPUT_NO_DEVICES=1