summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/x11/xinitrc4
-rw-r--r--.config/zsh/alias.zsh3
-rwxr-xr-x.local/bin/editermcmd4
-rwxr-xr-x.local/bin/editorcmd5
-rwxr-xr-x.local/bin/startemacs5
-rwxr-xr-x.local/bin/stopemacs1
6 files changed, 15 insertions, 7 deletions
diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc
index 5d1eaf3..5b68e7f 100644
--- a/.config/x11/xinitrc
+++ b/.config/x11/xinitrc
@@ -1,7 +1,7 @@
# vim: filetype=sh
startif() {
- if ! pgrep "$1"; then
+ if ! pgrep "$1" >/dev/null; then
bsdsetsid "$@" >/dev/null 2>&1
fi
}
@@ -14,7 +14,7 @@ startif musicpd
startif mpd-notification
startif lowbat
startif emacs --daemon
-notify-send -u low -t 2000 'emacs' ' Emacs daemonized'
+notify-send -u low -t 2000 'emacs' ' Emacs daemonized'
cd /home/jozan
xrdb /home/jozan/.config/x11/xresources
notify-send -u normal 'Welcome' " Welcome back, partner\!"
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index 47926f2..bcb8448 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -18,7 +18,8 @@ tree() {
}
alias \
e='editorcmd' \
- vim='editorcmd' \
+ et='editermcmd' \
+ vim='editermcmd' \
c='clear' \
less='less --tabs 4' \
bc='bc -l' \
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'