- Updated xkeysnail installer to properly copy desktop autostart and to restart service on config file changes

This commit is contained in:
Ben Reaves
2020-04-21 17:39:20 -05:00
parent 3b802d1d49
commit c1e2db9a2e
5 changed files with 49 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Kinto_xkey
GenericName=Kinto_xkey
Comment=Make Linux Type Like it's a Mac
Exec=/usr/bin/xhost +SI:localuser:root
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

View File

@@ -5,7 +5,7 @@ Description=xkeysnail
Type=simple
KillMode=process
ExecStartPre=/sbin/runuser -l {username} -c /home/{username}/.config/kinto/prexk.sh
ExecStart=/usr/bin/sudo /usr/local/bin/xkeysnail --quiet --watch /home/{username}/.config/kinto/kinto.py
ExecStart=/usr/bin/sudo /bin/bash -c '/home/{username}/.config/kinto/xkeystart.sh "/home/{username}/.config/kinto/kinto.py"'
ExecStop=/usr/bin/sudo /usr/bin/killall xkeysnail
Restart=on-failure
RestartSec=3

8
xkeysnail-config/xkeystart.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# >/dev/null 2>&1
/usr/local/bin/xkeysnail --quiet --watch "$1" &
while true
do inotifywait -e close_write,moved_to,create -q "$1"
/usr/bin/killall xkeysnail
/usr/local/bin/xkeysnail --quiet --watch "$1" &
done