aboutsummaryrefslogtreecommitdiff
path: root/linux/home/.config/tmux/tmux_number.sh
blob: 5d239d04831036706e9ab7ef50d6c453e7fda14b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
set -x
dest="$1"
[ "x""$dest" != "x" ]
tmux list-windows -F "#{window_index}" | grep "^${dest}$" 2>&1 >/dev/null
ret="$?"
if [ "x""$ret" = "x0" ]; then
    tmux swap-window -t ":${dest}"
else
    tmux move-window -t ":${dest}"
fi