joshmedeski / sesh

Smart session manager for the terminal
MIT License
409 stars 16 forks source link

Shortcut per session as configuration #107

Closed rtalexk closed 1 month ago

rtalexk commented 1 month ago

What would you like sesh to do?

I've been using Sesh for a while and it is extraordinary, it solves a pain I was having.

It is pretty common that I always navigate to the same sessions (the project I'm working on, my dotfiles, my notes, etc). And every time I want to switch between them I have to <prefix>B + K and then some chars to focus the right session.

It would be amazing if you could assign a shortcut to each session in the configuration file as below, this would streamline the navigation a lot.

[[session]]
name = "Downloads 📥"
path = "~/Downloads"
startup_command = "ls"
shortcut = "<C-1>"

[[session]]
name = "tmux config"
path = "~/c/dotfiles/.config/tmux"
startup_command = "nvim tmux.conf"
shortcut = "<C-2>"
joshmedeski commented 1 month ago

You could add your own binding to your tmux config:

bind-key 1 run-shell -b "sesh connect 'Downloads 📥'"

As of right now sesh doesn't make any changes to tmux, it's just a binary you can use to interact with tmux.

rtalexk commented 1 month ago

I see, I got confused by the bindings on fzf to reload the search result, and the option to bind the connect in the Tmux config is also a convenient way to address my need. Thank you!