diff options
Diffstat (limited to 'scripts/tmux_window_renum.sh')
-rwxr-xr-x | scripts/tmux_window_renum.sh | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/scripts/tmux_window_renum.sh b/scripts/tmux_window_renum.sh deleted file mode 100755 index ed33584..0000000 --- a/scripts/tmux_window_renum.sh +++ /dev/null @@ -1,15 +0,0 @@ -for session in $(tmux ls | awk -F: '{print $1}') ; do - active_window=$(tmux lsw -t ${session} | awk -F: '/\(active\)$/ {print $1}') - inum=0 - for window in $(tmux lsw -t ${session} | awk -F: '{print $1}') ;do - if [ ${window} -gt ${inum} ] ;then - echo "${session}:${window} -> ${session}:${inum}" - tmux movew -d -s ${session}:${window} -t ${session}:${inum} - fi - if [ ${window} = ${active_window} ] ;then - new_active_window=${inum} - fi - inum=$((${inum}+1)) - done - tmux select-window -t ${session}:${new_active_window} -done |