From d8c516c13c997b8fcc8624ee526c9d0f5448fbbf Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Tue, 4 Feb 2020 19:45:39 -0600 Subject: [PATCH] - Fixes login/logout and reboot startup issues, delays the start by 5 seconds --- keyswap_service.sh | 5 +++-- system-config/keyswap.timer | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 system-config/keyswap.timer diff --git a/keyswap_service.sh b/keyswap_service.sh index cdf8412..8e0d807 100755 --- a/keyswap_service.sh +++ b/keyswap_service.sh @@ -4,9 +4,10 @@ swapcmd="\/bin\/bash\ \/home\/`whoami`\/.config\/kinto\/xactive.sh" mkdir -p ~/.config/systemd/user mkdir -p ~/.config/autostart cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service +cp ./system-config/keyswap.timer ~/.config/systemd/user/keyswap.timer cp ./kintox11/binary/kintox11 ~/.config/kinto/kintox11 cp ./system-config/xactive.sh ~/.config/kinto/xactive.sh sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service -systemctl --user enable keyswap -systemctl --user start keyswap \ No newline at end of file +systemctl --user enable keyswap.timer +systemctl --user start keyswap.timer \ No newline at end of file diff --git a/system-config/keyswap.timer b/system-config/keyswap.timer new file mode 100644 index 0000000..3274a88 --- /dev/null +++ b/system-config/keyswap.timer @@ -0,0 +1,10 @@ +# keyswap.timer +[Unit] +Description=Runs the keyswap.service 5 seconds after boot up + +[Timer] +OnBootSec=5s +Unit=keyswap.service + +[Install] +WantedBy=default.target