Skip to content

Instantly share code, notes, and snippets.

@owulveryck
Created May 17, 2021 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owulveryck/511fda16e0ccfce55f43257dd63795de to your computer and use it in GitHub Desktop.
Save owulveryck/511fda16e0ccfce55f43257dd63795de to your computer and use it in GitHub Desktop.
shell wrapper to trigger my dev tools
#!/bin/zsh
if [ ! "$TMUX" ]; then
tmux new-session $0 $@
exit
fi
tmux new-window -n "vim $@"
LASTWINDOW=$(tmux list-windows | sort -k 8 | tail -1 | sed 's/\([0-9]*\):.*/\1/')
tmux select-window -t :$LASTWINDOW
tmux send-keys -t :$LASTWINDOW "vim $@" C-m
tmux split-window -v
tmux resize-pane -y 15
tmux select-pane -t 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment