mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
22 lines
642 B
TOML
22 lines
642 B
TOML
[metadata]
|
|||
|
|
name = "tmux-sessions"
|
||
|
|
description = "List and manage tmux sessions"
|
||
|
|
requirements = ["tmux"]
|
||
|
|
|
||
|
|
[source]
|
||
|
|
command = "tmux list-sessions -F '#{session_name}\t#{session_windows} windows\t#{session_created_string}'"
|
||
|
|
display = "{split:\t:0} ({split:\t:1})"
|
||
|
|
output = "{split:\t:0}"
|
||
|
|
|
||
|
|
[preview]
|
||
|
|
command = "tmux capture-pane -t '{split:\t:0}' -p 2>/dev/null || echo 'No preview available'"
|
||
|
|
|
||
|
|
[actions.attach]
|
||
|
|
description = "Attach to the selected session"
|
||
|
|
command = "tmux attach-session -t '{split:\t:0}'"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.kill]
|
||
|
|
description = "Kill the selected session"
|
||
|
|
command = "tmux kill-session -t '{split:\t:0}'"
|
||
|
|
mode = "fork"
|