If you like tmux, take a look at zellij ( https://github.com/zellij-org/zellij ), it is a modern alternative that has a lot of nice features (either developed, or on the roadmap) that tmux is missing. Have no relationship to it, just a happy "customer".
Use fzf for tmux session switching
41–50 of 61 posts
Re: Use fzf for tmux session switching
#42Earlier quoted context omitted.
You can ssh into a system and use tmux. Then you can detach from the session and when you come back a week later your tmux session is still there and you can continue with no friction. Also i find it interesting that you said you don't see its value and then continued to explain its value. For me it's definitely more common to work with systems/servers without a DE and WM. It's just better to handle this problem at t…
I’m a huge fan of `tmux -CC` for stuff like this!
Re: Use fzf for tmux session switching
#43I really like iTerm2 for Mac. The tabs, splits, and navigation, are intuitive and powerful. I haven’t found a need for tmux. I use fzf for file finding, it looks like this is use is a subset of iTerm2 capabilities
Essentially you get all tmux functionality on the remote but with the local ergonomics you're already used to.
Re: Use fzf for tmux session switching
#44If you like tmux, take a look at zellij ( https://github.com/zellij-org/zellij ), it is a modern alternative that has a lot of nice features (either developed, or on the roadmap) that tmux is missing. Have no relationship to it, just a happy "customer".
I remember getting into Unix just a little before the time tmux came onto scene as the modern alternative to screen, and being in awe of all the people who had used screen long enough to have a list of things that could be modernised about it.
Now tmux is in that position!
Re: Use fzf for tmux session switching
#45Another reason for using tmux: never worry about changing your muscle memory for splits and nav ever again. I've been using tmux for five or six years. In that time I've used Linux and MacOS and several different terminals. But how I navigate around a terminal has stayed the same thanks to tmux. Another reason: put complex tmuxinator configs in source control and start up a bunch of stuff for your project with a sing…
Re: Use fzf for tmux session switching
#46I still don't quite understand the value of tmux, at least on a modern machine. If I need another terminal, I just pop open another terminal window and tile or tab it. If I want to keep a set of terminals organized, I use workspaces (at the OS level). I can obviously see its value if there is no window manager or desktop environment on the system I'm using, but that's rare these days–if I'm working on a system with n…
Re: Use fzf for tmux session switching
#47I still don't quite understand the value of tmux, at least on a modern machine. If I need another terminal, I just pop open another terminal window and tile or tab it. If I want to keep a set of terminals organized, I use workspaces (at the OS level). I can obviously see its value if there is no window manager or desktop environment on the system I'm using, but that's rare these days–if I'm working on a system with n…
Also - for long running processes, you can run stuff in a tmux session, go to bed, and wake up hours later and see exactly what happened. You can make the scrollback buffer as big as you want. My scrollback history is 50k lines, and that's totally fine. Of course the history is searchable with vim commands which is also nice.
Re: Use fzf for tmux session switching
#48tmux sessions are incredibly useful for keeping multiple projects organized. i just wish i could connect to remote tmux back ends and recover windows as organized locally after a network cut. so the local tmux presents the ui and performs session management, and the remote tmux backends hold the shells to provide network cut resilience, but still rely on the local ui instance for all user interaction (so cut/paste bu…
$ ssh
$ tmux --list-sessions
and
$ tmux --attach-session -t
?
Re: Use fzf for tmux session switching
#49tmux sessions are incredibly useful for keeping multiple projects organized. i just wish i could connect to remote tmux back ends and recover windows as organized locally after a network cut. so the local tmux presents the ui and performs session management, and the remote tmux backends hold the shells to provide network cut resilience, but still rely on the local ui instance for all user interaction (so cut/paste bu…
I have an "outside" tmux session that can be run at either my desktop or laptop. When I start fresh, I open an outside tmux session and run a startup script. This preloads my outside session's copy buffers with named passwords from the `pass` password manager and creates windows to each of my remote sites. The shell for each of these windows is set to a script that does a simple loop of network check than attempt to ssh to the remote site. This ssh connection has an environment variable set that my remote bashrc will see. When this variable is set, my remote "inside" tmux connection is automatically recalled (or created if it doesn't exist.)
I have a script runs when I put the laptop to sleep that kills all the SSH connections cleanly, and when it wakes up again, every window reconnects to the remote machines and opens the remote tmux connections again. Everything is exactly where it was before and needs no intervention.
Re: Use fzf for tmux session switching
#50I ended up writing a shell script [1] to use fzf to display a list not only of sessions, but the windows within each session.
Which I invoke from tmux like this:
bind C-a run-shell -b "$HOME/.local/bin/ftwind"
This has become so ingrained in my tmux workflow that I would be utterly helpless without it.
[1]: https://github.com/anelson/dotfiles/blob/master/home/.local/...
EDIT: for formatting