diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-01-12 07:39:42 +0530 | 
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-01-12 07:39:42 +0530 | 
| commit | 9c1eb921534f72c07e6b74505fafc5f74a27f997 (patch) | |
| tree | 6c5ae4e1bb0cdcd6ce9042ceac8ec6d750aad1a0 /.local/bin | |
| parent | 6875a20d9eade73d90990f5983f0dfe73c9bbba5 (diff) | |
updates
Diffstat (limited to '')
| -rwxr-xr-x | .local/bin/tmux-sessionizer | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/tmux-sessionizer b/.local/bin/tmux-sessionizer new file mode 100755 index 0000000..8f1c263 --- /dev/null +++ b/.local/bin/tmux-sessionizer @@ -0,0 +1,15 @@ +#!/bin/bash + +DIR=$(fdfind --type d --strip-cwd-prefix -L -H | fzf) +SESSION_NAME="$DIR_$(date +%M%S)" + +if [ -n "$DIR" ] +then +  tmux new-session -d -c "$DIR" -s "$SESSION_NAME" +  if [ -n "$TMUX" ] +  then +    tmux switch -t "$SESSION_NAME" +  else +    tmux attach -t "$SESSION_NAME" +  fi +fi  | 
