diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-09-12 13:49:50 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-09-12 13:51:25 -0700 |
commit | fa94f4d92340f001560b16dd0c2e5681ca5db031 (patch) | |
tree | 8de1aa88979d8d8606cf0a7f737d33fbb633f7b7 /sandbox/mu_run | |
parent | 7169c636272a71a9f18d6c90e458c8089346c1fe (diff) | |
download | mu-fa94f4d92340f001560b16dd0c2e5681ca5db031.tar.gz |
2183 - environment + external editor using tmux
Thanks Jack and Caleb Couch for the idea.
Diffstat (limited to 'sandbox/mu_run')
-rwxr-xr-x | sandbox/mu_run | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sandbox/mu_run b/sandbox/mu_run new file mode 100755 index 00000000..8d606fcd --- /dev/null +++ b/sandbox/mu_run @@ -0,0 +1,15 @@ +#!/usr/bin/zsh + +export ALREADY_FOCUSED=0 +tmux list-panes |grep "^1.*active" -q && export ALREADY_FOCUSED=1 +if [[ $ALREADY_FOCUSED -eq 0 ]] +then + tmux select-pane -t 1 +fi + +tmux send-keys 'F4' + +if [[ $ALREADY_FOCUSED -eq 0 ]] +then + tmux last-pane +fi |