-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skhd hot reloading doesn't work #333
Comments
I am seeing similar behavior to you. I suspect it may have something to do with the symlink changing when running I am creating a file in {
home.file.skhd = {
target = ".config/skhd/skhdrc";
text = ''
...
'';
} After running ❯ l.
skhdrc -> /nix/store/2scv6kjzkpn9ghmhrmg2n46yvvpdzcr4-home-manager-files/.config/skhd/skhdrc Making changes and running ❯ l.
skhdrc -> /nix/store/500pniqi49phnlhicmig8cp12ficgnmj-home-manager-files/.config/skhd/skhdrc Running |
It might be easiest to just add system.activationScripts.postActivation.text = ''
${pkgs.skhd} -r
''; |
After some research i found that as the time of writing skhd doesn't support hot-reloading on symlinks. My workaround solution in the meantime:system.activationScripts.postActivation.text = ''
su - $(logname) -c '${pkgs.skhd}/bin/skhd -r'
''; (This solution also should work on multi-user setup)
I got inspiration from @Samasaur1's idea but to make it work the script needs to run as the same user who is logged (`postActivation` uses root and this does not work).
|
I can't get skhd to do anything in my setup. Skhd is allowed to be run in the background, and also it's enabled in Could my issue be related, or should I create a new ticket? |
Doesn't sound like your issue is with hot reloading. |
Seems like
skhd
configurations changes inservices.skhd.skhdConfig
are applied only upon system restart/manual service reload vialaunchctrl
.skhd
has a feature to hot load its configurations, and for some reason that's not working.I also tried using manual reload, but it could not lock
pid-file
. Reading the sources ofskhd
makes me think that the file was not properly created and unfortunately I didn't check it before restarting the service manually vialanuchctl
, which fixes the issue.What works so far is manually restarting the service
And then after every
darwin-rebuild switch
I need toskhd -r
.Any ideas how to automate it? Please let me know if you need more information.
P.S. I am using
nix
,nix-darwin
andhome-manager
for the second day only, so might be missing something obvious.The text was updated successfully, but these errors were encountered: