From ab987e10f154f5536bb8fd936ae0966e909fa969 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 15 Jun 2023 15:58:59 -0500 Subject: added all my scripts --- tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager) | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager) (limited to 'tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager)') diff --git a/tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager) b/tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager) new file mode 100755 index 0000000..4ad505d --- /dev/null +++ b/tmuxsh/_tmux_goto_pod,--.jump.to.named.window.(podcast.manager) @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +# Window Name from filename (e.g _tmux_goto_name,-- description --> name) +WIN_NAME="$(echo "${0##*/}" | cut -d ',' -f1 | cut -d '_' -f4)" +LINE=$(tmux list-windows -a -F "#{session_name}:#{window_id}: #{window_name}" | grep ": ${WIN_NAME}$") || exit 0 +SESSION="$(echo "$LINE" | cut -d ':' -f1)" +WINDOW_NUM="$(echo "$LINE" | cut -d ':' -f2)" +tmux select-window -t "$WINDOW_NUM" && tmux switch-client -t "$SESSION" -- cgit v1.2.3-70-g09d2