From 3aa5120c24cb984ed37d75baf7af57f6b45e8d28 Mon Sep 17 00:00:00 2001 From: cho Date: Tue, 5 Sep 2023 20:41:22 +0700 Subject: [PATCH] properly kill emacs instead of using kill --- home/default/.local/bin/sysact | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/default/.local/bin/sysact b/home/default/.local/bin/sysact index 2f08303..4ec3676 100755 --- a/home/default/.local/bin/sysact +++ b/home/default/.local/bin/sysact @@ -25,7 +25,7 @@ case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n ' fcitx5') fcitx5 ;; ' kill fcitx5') killall fcitx5 ;; ' start emacs daemon') emacs --daemon && notify-send 'emacs daemon started' ;; - ' kill emacs daemon') killall emacs && notify-send 'emacs daemon killed' ;; - ' restart emacs daemon') killall emacs && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;; + ' kill emacs daemon') emacsclient -e '(kill-emacs)' && notify-send 'emacs daemon killed' ;; + ' restart emacs daemon') emacsclient -e '(kill-emacs)' && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;; *) exit 1 ;; esac