From fa94f4d92340f001560b16dd0c2e5681ca5db031 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 12 Sep 2015 13:49:50 -0700 Subject: 2183 - environment + external editor using tmux Thanks Jack and Caleb Couch for the idea. --- sandbox/mu_run | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 sandbox/mu_run (limited to 'sandbox/mu_run') 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 -- cgit 1.4.1-2-gfad0