diff options
author | Cody Hiar <cody@hiar.ca> | 2021-11-25 11:30:46 -0700 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-11-25 11:30:46 -0700 |
commit | 2e7676ad969cb3dcfe085f643d422577baa48148 (patch) | |
tree | 90993e34afe00884bb6dcfed23a0451ce887744f /scripts | |
parent | 5859c5812f75d1714b79272139d2c4df5031e569 (diff) |
trying some new things
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/window_renum | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/scripts/window_renum b/scripts/window_renum deleted file mode 100755 index ef0a87f..0000000 --- a/scripts/window_renum +++ /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 |