diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-03-25 23:38:13 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-03-25 23:38:13 -0500 |
commit | e6051a38a672182c7f7dfa083ca1e72b97803c94 (patch) | |
tree | 734e251bab033169399432fe1c93fc879dfab578 /tmux/.local/bin/tmux-windowizer | |
parent | bb375ba979dfc0c575443f8309ee52d0fd446a26 (diff) |
feat: migrated to gnu stow
Diffstat (limited to 'tmux/.local/bin/tmux-windowizer')
-rwxr-xr-x | tmux/.local/bin/tmux-windowizer | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tmux/.local/bin/tmux-windowizer b/tmux/.local/bin/tmux-windowizer new file mode 100755 index 0000000..6cee8b0 --- /dev/null +++ b/tmux/.local/bin/tmux-windowizer @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +branch_name=$(basename $1) +session_name=$(tmux display-message -p "#S") +clean_name=$(echo $branch_name | tr "./" "__") +target="$session_name:$clean_name" + +if ! tmux has-session -t $target 2>/dev/null; then + tmux neww -dn $clean_name +fi + +shift +tmux send-keys -t $target "$* +" |