mirror of
https://github.com/theniceboy/.config.git
synced 2026-02-04 03:53:27 +08:00
disable agent tracker in left tmux status
This commit is contained in:
parent
3602e03a67
commit
9188c9fdd1
4 changed files with 32 additions and 168 deletions
|
|
@ -86,6 +86,7 @@ def command_switch(index_str: str) -> None:
|
|||
if index > len(sessions):
|
||||
return
|
||||
run_tmux(["switch-client", "-t", sessions[index - 1]["id"]], check=False)
|
||||
run_tmux(["refresh-client", "-S"], check=False)
|
||||
|
||||
|
||||
def command_rename(label: str) -> None:
|
||||
|
|
|
|||
|
|
@ -6,4 +6,10 @@ if [[ -z "$index" || ! "$index" =~ ^[0-9]+$ ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
python3 "$HOME/.config/tmux/scripts/session_manager.py" switch "$index"
|
||||
# Get session matching index prefix (e.g., "1-" for index 1)
|
||||
target=$(tmux list-sessions -F '#{session_id} #{session_name}' 2>/dev/null | awk -v idx="$index" '$2 ~ "^"idx"-" {print $1; exit}')
|
||||
|
||||
if [[ -n "$target" ]]; then
|
||||
tmux switch-client -t "$target"
|
||||
tmux refresh-client -S
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue