3 ms·
My self-contained Tmux configuration
- deweller 12y agoOn the topic of tmux, has anyone created a nice way to save an active tmux configuration layout? tmuxinator and the like let you specify the configurations ahead of time, but I want to save an active layout for later use. I haven't found a tool for that yet.
- ilcavero 12y agoI was looking on doing the same but ended up doing some hackish bash script, as in: byobu new-session -d; byobu split-window -d; byobu split-window -dh; byobu Getting it to run a command automatically on each panel got too complicated so I settled on that. (byobu is a preconfigured tmux from ubuntu)
- jamestomasino 12y agoI've got a solution that is halfway working. It saves sessions, windows, and paths, but not panes: https://github.com/jamestomasino/bin/blob/master/tmux-session https://github.com/jamestomasino/bin/blob/master/tmux-sessio...
- brunosutic 12y agoI've just published a tmux plugin that let's you save tmux environment and restore it later. https://github.com/tmux-plugins/tmux-resurrect https://github.com/tmux-plugins/tmux-resurrect
- c0rner 12y agohttps://github.com/c0rner/scripts/blob/master/tmux_save https://github.com/c0rner/scripts/blob/master/tmux_save
- fnbr 12y agoUnrelated to Tmux, what did you do to get the cool prompt?
- gpakosz 12y agoBTW I've been asked why I don't use resize-pane -Z. The "maximize any pane to a new window with <prefix>+" feature is different from stock resize-pane -Z as it allows you to further split a maximized pane. Also, you can maximize a pane to a new window, then change window, then go back and the pane is still in maximized state in its own window. You can then minimize a pane by using <prefix>+ either from the source window or the maximized window. See it in action: http://pempek.net/images/original/maximizing-tmux-pane-new-window/maximizing-tmux-pane-new-window.gif http://pempek.net/images/original/maximizing-tmux-pane-new-w...
- jamestomasino 12y agoA lovely set-up. I may grab a few tidbits for my own. I'm also doing a powerline (airline) inspired bar, but I put mine at the top so I don't get it confused in vim. I really like the maximize/promote to window feature. Here's my conf for reference: https://github.com/jamestomasino/dotfiles/blob/master/bash/.tmux.conf https://github.com/jamestomasino/dotfiles/blob/master/bash/....
- azmenthe 12y agoThe (left,right)_seperators for me are | instead of the cool looking arrows. How do I enable these?
- gpakosz 12y agoafter having installed it, $ cp ~/.tmux/.tmux.conf.local ~/ Then edit `.tmux.conf.local` and uncomment the #tmux_conf_theme=powerline_patched_font line. For the powerline symbol to work, you need patched fonts: https://github.com/Lokaltog/powerline-fonts https://github.com/Lokaltog/powerline-fonts
- azmenthe 12y agoAh great, I uncommented the line but I didn't have the fonts installed.
- aharris88 12y agoWhat kind of mouse configurations do you have set?
- gpakosz 12y ago<prefix>m toggles: mode-mouse mouse-resize-pane mouse-select-pane mouse-select-window see https://github.com/gpakosz/.tmux/blob/d8b9498d6940b535d3181eddae410a9ace167b0e/.tmux.conf#L277-280 https://github.com/gpakosz/.tmux/blob/d8b9498d6940b535d3181e...
- dahart 12y agoC-a conflicts with bash's move to start of line. Not everyone would care, but that's one of the few bash shortcuts I personally consider important. I can't stand the default C-b either, it feels like an awkward reach to me and makes tmux seem to require way too much chording. I've recently switched to using C-j, which duplicates the enter key. I also changed next and prev page from n / p to C-n / C-p. That way I can fly through my tabs with a single press & hold on the Ctrl key. So much nicer.
- macbony 12y agoC-a a is an extra keypress but good enough for me.
- gpakosz 12y agoI learnt to C-a twice and then I switched my prompt to vi input mode. But I get your concerns!
- dahart 12y agoIt would fight my ingrained emacs muscle memory habits, especially when not using tmux. But, I really should just change my habit to use the home key instead of using C-a at all. I had a narrative in my head about home & end keys not always working over ssh, but now I think they work everywhere I need; That story might have been burned into my head decades ago. C-j does make a nice tmux prefix though; give it a whirl and see. Part of it for me is the two-hand chord versus one-hand chord. C-j feels easier for me to hit than either C-a or C-b. In any case, I forgot to compliment you on the project - your tmux modeline does look awesome!
- gpakosz 12y agoThanks, well credit where it's due, the look and feel steals from @myusuf3 who made me discover his powerline inspired configuration in https://www.youtube.com/watch?v=ASOwagptPB8 https://www.youtube.com/watch?v=ASOwagptPB8. Then, I made in sort everything is self-contained.
- 12y ago
- brunosutic 12y agoThis looks very cool!