mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Updated tmux config for prefix-S to switch sessions
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
selected=$(find ~/LocalProjects ~/ -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
selected=$(find ~/projects ~/ -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
session=${1}
|
||||
if [ $# -eq 1 ]; then
|
||||
session=${1}
|
||||
else
|
||||
session=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
|
||||
fi
|
||||
|
||||
if [ -z "$session" ]; then
|
||||
choice=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
|
||||
tmux switch-client -t "$choice" || tmux attach -t "$choice"
|
||||
else
|
||||
tmux switch-client -t "$session" || tmux attach -t "$session"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tmux switch-client -t "$session" || tmux attach -t "$session"
|
||||
|
||||
Reference in New Issue
Block a user