mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 17:58:30 +02:00
refactor: just - emacs reload for linux & macos
This commit is contained in:
28
Justfile
28
Justfile
@@ -405,25 +405,23 @@ emacs-purge:
|
|||||||
doom clean
|
doom clean
|
||||||
doom sync
|
doom sync
|
||||||
|
|
||||||
|
[linux]
|
||||||
[group('emacs')]
|
[group('emacs')]
|
||||||
[no-quiet]
|
|
||||||
emacs-reload:
|
emacs-reload:
|
||||||
#!/usr/bin/env nu
|
|
||||||
doom sync
|
doom sync
|
||||||
|
systemctl --user restart emacs.service
|
||||||
|
systemctl --user status emacs.service
|
||||||
|
|
||||||
let emacs_plist_path = "~/Library/LaunchAgents/org.nix-community.home.emacs.plist"
|
|
||||||
if "Darwin" == (uname).kernel-name {
|
emacs-plist-path := "~/Library/LaunchAgents/org.nix-community.home.emacs.plist"
|
||||||
print $"Running on macOS, reload launchd daemon via ($emacs_plist_path)"
|
|
||||||
launchctl unload $emacs_plist_path
|
[macos]
|
||||||
launchctl load $emacs_plist_path
|
[group('emacs')]
|
||||||
tail -f ~/Library/Logs/emacs-daemon.stderr.log
|
emacs-reload:
|
||||||
} else if "Linux" == (uname).kernel-name {
|
doom sync
|
||||||
systemctl --user restart emacs.service
|
launchctl unload {{emacs-plist-path}}
|
||||||
systemctl --user status emacs.service
|
launchctl load {{emacs-plist-path}}
|
||||||
} else {
|
tail -f ~/Library/Logs/emacs-daemon.stderr.log
|
||||||
print "Unsupported platform"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# =================================================
|
# =================================================
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user