Skip to content

Instantly share code, notes, and snippets.

@owulveryck
Created May 17, 2021
Embed
What would you like to do?
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