baskerville / sxhkd

Simple X hotkey daemon
BSD 2-Clause "Simplified" License
2.79k stars 139 forks source link

Is it possible/desirable to restart sxhkd when it's updated without processes dying #236

Open 06kellyjac opened 3 years ago

06kellyjac commented 3 years ago

Is it possible/desirable to restart sxhkd when it's updated without processes dying?

I'm aware of pkill -USR1 -x sxhkd for when the config updates. When I say sxhkd is updated I mean from say 0.6.1 -> 0.6.2 or some dependency in the build of sxhkd is updated resulting in a rebuild.

I ask in two parts really, is it desireble or just not a big deal to wait until reboot, and is it possible or causes more problems etc?

your-friend-alice commented 3 months ago

if you're using it as a systemd user service, you can restart it with systemctl --user restart sxhkd.service.

If your setup launches sxhkd from a shell script (like bspwmrc), you can wrap it in a while loop like (while true; do sxhkd; done) & and it'll automatically restart when you kill it with killall.