From ba06b5fb8c054f769c303c8b02a08502d6067210 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 23 Apr 2022 02:27:49 +0200 Subject: update --- .local/bin/editermcmd | 4 ++++ .local/bin/editorcmd | 5 +++-- .local/bin/startemacs | 5 +++-- .local/bin/stopemacs | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100755 .local/bin/editermcmd (limited to '.local/bin') diff --git a/.local/bin/editermcmd b/.local/bin/editermcmd new file mode 100755 index 0000000..9a7c8ba --- /dev/null +++ b/.local/bin/editermcmd @@ -0,0 +1,4 @@ +#!/bin/sh + +pgrep emacs >/dev/null && exec bsdsetsid emacsclient -nw "$@" >/dev/null +exec nvim "$@" diff --git a/.local/bin/editorcmd b/.local/bin/editorcmd index f79baea..ccd5359 100755 --- a/.local/bin/editorcmd +++ b/.local/bin/editorcmd @@ -1,3 +1,4 @@ -#!/usr/local/bin/dash +#!/bin/sh -exec bsdsetsid emacsclient -c -a /usr/local/bin/nvim "$@" +pgrep emacs >/dev/null && exec bsdsetsid emacsclient -c "$@" >/dev/null +exec nvim "$@" diff --git a/.local/bin/startemacs b/.local/bin/startemacs index 4a61641..d0034d6 100755 --- a/.local/bin/startemacs +++ b/.local/bin/startemacs @@ -1,6 +1,7 @@ #!/bin/sh -if ! pgrep emacs; then - bsdsetsid emacs --daemon >/dev/null 2>&1 +if ! pgrep emacs >/dev/null; then + emacs --daemon >/dev/null 2>&1 + exec notify-send -u low -t 2000 'emacs' ' Emacs daemonized' fi diff --git a/.local/bin/stopemacs b/.local/bin/stopemacs index d661941..d31541c 100755 --- a/.local/bin/stopemacs +++ b/.local/bin/stopemacs @@ -1,3 +1,4 @@ #!/bin/sh emacsclient -e '(save-buffers-kill-terminal)' +exec notify-send -u low -t 2000 'emacs' ' Emacs daemon stoped' -- cgit v1.2.3