From 8866483844e64543a652590e2ec9aa40a5bb6ef4 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 28 Jan 2021 08:34:35 -0700 Subject: Updating scripts --- scripts/window_renum.sh | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 scripts/window_renum.sh (limited to 'scripts/window_renum.sh') diff --git a/scripts/window_renum.sh b/scripts/window_renum.sh deleted file mode 100755 index ef0a87f..0000000 --- a/scripts/window_renum.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# vim: set filetype=sh -# -# Author: Unknown -# Date: 2016-11-09 -# -# Description: Renumber tmux windows (1, 3, 4, 6) -> (1, 2, 3, 4) - -for session in $(tmux ls | awk -F: '{print $1}') ; do - active_window=$(tmux lsw -t ${session} | awk -F: '/\(active\)$/ {print $1}') - inum=1 - 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 -- cgit v1.2.3