diff options
-rw-r--r-- | .tmux.conf | 2 | ||||
-rwxr-xr-x | bin/tmuxmacs | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -47,7 +47,7 @@ bind g new-window -c "#{pane_current_path}" "grep --color=always -Eir '(copyrigh # bind R command-prompt -p "ssh to host" "split-window 'ssh %1'" # bind r command-prompt -p "ssh to host" "new-window -n %1 'ssh %1'" # bind E split-window 'emacsclient -amg -t' -bind e new-window -n emacs "emacsclient -t" +bind e run-shell tmuxmacs # bind t new-window -n irssi 'ii' # ftp-master: tmux setup for NEW processing diff --git a/bin/tmuxmacs b/bin/tmuxmacs new file mode 100755 index 00000000..61bc6c52 --- /dev/null +++ b/bin/tmuxmacs @@ -0,0 +1,10 @@ +#!/bin/sh + +if tmux has-session -t:0 >/dev/null; then + # switch to it (creating windows interactively doesn't use index 0, so + # implicitly reserved for Emacs) + tmux select-window -t:0 +else + # start it if no frame exists yet + tmux new-window -t:0 -n Emacs emacsclient -t +fi |