diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:26:00 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:26:00 +0200 |
| commit | 280f7799be30cba8fa893b489c49ac511cefe229 (patch) | |
| tree | 42af915569ea285a14592dfa2c297cd5a61695a8 /linux/home/.config/tmux/tmux_number.sh | |
| parent | 8bf8d581c970058d4a437961127c7b6bd83118ba (diff) | |
| download | dotfiles-280f7799be30cba8fa893b489c49ac511cefe229.tar.gz dotfiles-280f7799be30cba8fa893b489c49ac511cefe229.zip | |
Tmux config changes
Diffstat (limited to 'linux/home/.config/tmux/tmux_number.sh')
| -rwxr-xr-x | linux/home/.config/tmux/tmux_number.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/home/.config/tmux/tmux_number.sh b/linux/home/.config/tmux/tmux_number.sh new file mode 100755 index 0000000..5d239d0 --- /dev/null +++ b/linux/home/.config/tmux/tmux_number.sh @@ -0,0 +1,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 |
