logoalt Hacker News

hugodanlast Monday at 3:37 PM6 repliesview on HN

I would love to have a way to switch sessions easily, like with panes where I just click or have more shortcuts available


Replies

maniacalrobotyesterday at 7:37 PM

Here’s a simple session switcher: `bind C-a display-popup -E "tmux list-sessions -F '#{session_name}' | fzf --reverse | xargs tmux switch-client -t"`. No plugins, nothing fancy, just works.

nagaiaidayesterday at 3:24 AM

i just have a little script called session (invoked as session namespace name and mapping to a tmux session called namespace/name and searching all namespaces if the namespace is elided) that just does the right tmux invocation for the various intersecting cases of [in or not in a tmux session already, target session does or does not exist] which also has the side benefit of leaving shell history breadcrumbs i can follow between sessions later if needed

fenazegolast Monday at 8:30 PM

I use byobu for managing tmux windows and sessions https://www.byobu.org/

gsinclairlast Monday at 4:37 PM

People have developed plugins for this. Check out “sesh” for instance.

Switching between sessions with fuzzy finding, and creating new ones when needed, is a wonderful feature.

saint_yossarianlast Monday at 7:11 PM

Check out the `choose-tree` and `display-menu` commands.

lozflast Monday at 3:46 PM

Prefix-w works, or did you want something more?