TalonCommunity / Wiki

Community maintained wiki for Talon Voice
https://talon.wiki
82 stars 81 forks source link

Add linux section about running talon from systemd user service with watchdog #294

Open fidgetingbits opened 3 months ago

fidgetingbits commented 3 months ago

From a slack discussion about auto-starting talon on login:

https://gist.github.com/fidgetingbits/a9c9d4786dd28c0f5224071280edfb66 Those are auto-generated from my nix config, so there might be some oddities, but should mostly work for others with fixed paths I think. The reason for a watchdog is that talon is still running and spitting stalled warnings to the log, so systemd never actually detects that it needs to be restarted. I think systemd watchdog only works if the running service exits/crashes. So here the separate watchdog service monitors the talon log. This type of stall happens if you make a mistake while developing new features or accidentally run a command that blocks, so is nice to catch it and have it restart without having to go find a keyboard.