tmux-thumbs/tmux-thumbs.sh

11 lines
345 B
Bash
Raw Normal View History

2019-02-04 21:40:45 +00:00
#!/usr/bin/env bash
2019-03-05 08:10:41 +00:00
CURRENT_PANE_ID=$(tmux list-panes -F "#{pane_id}:#{?pane_active,active,nope}" | grep active | cut -d: -f1)
2019-03-05 23:41:35 +00:00
COMMAND="tmux-thumbs -a qwerty -r -u --tmux-pane ${CURRENT_PANE_ID}"
2019-03-05 08:10:41 +00:00
tmux new-window -d -n "[thumbs]" ${COMMAND}
NEW_PANE_ID=$(tmux list-panes -a | grep 0:3.1 | grep -o '%[0-9]\+')
tmux swap-pane -t ${NEW_PANE_ID}