Show HN: I’m writing an ebook version of the Tao of tmux
I am aiming for a December 23rd, 2016 release and am plugging away full time.
I make it available to read on the web for free at https://leanpub.com/the-tao-of-tmux/read.
The GitHub is at https://github.com/git-pull/tao-of-tmux.
For pre-ordering:
- The Leanpub page (updated on a regular basis) is https://leanpub.com/the-tao-of-tmux.
- Amazon Kindle: https://www.amazon.com/gp/product/B01MG342KU
- iTunes: https://geo.itunes.apple.com/us/book/the-tao-of-tmux/id1168912720
Also I have a coupon for pre-orders @ $7.99 https://leanpub.com/the-tao-of-tmux/c/oBsI4y3o4quu.
So there are 2 other books available in the now. I prefer my style of writing about tmux and teaching, since I maintain a few open source libraries for tmux I bring my own perspective along. Also I'd rather stay away from publishers, again, I prefer a book that's available for free to read on the web, DRM-free if you pay, and not have to worry about printing :). It's my first book ever so I feel a lot of pressure to get it done right.
I'm definitely open to feedback and requests to add things. I feel a duty to make a really good book for the community. Any help to spread the word is much appreciated!
20 comments
[ 2.7 ms ] story [ 52.1 ms ] thread> Does tmux persist sessions after restarts?
I suggest mentioning tmux-resurrect: https://github.com/tmux-plugins/tmux-resurrect as this has made me far less grumpy about restarting a machine with many active tmux sessions. Save/Reload all your sessions, windows, panes, and layouts with a single shortcut key.
https://github.com/tmux-plugins/tmux-continuum looks really nice as well.
I am interested in knowing any plugins beyond tmuxp / tmuxinator / teamocil that'd be worth covering in the book. https://github.com/tmux-plugins seems like a great resource.
This should probably say physical keyboards. Mechanical typically refers to the ones that go clickety clack.
Edit: And
>our username’s in the channel persisted in the chatroom list
this should say usernames instead. Hope you'll have a proofreader look through all of it!
> Hope you'll have a copywriter look through all of it!
I'll likely put the proceeds from the pre-orders to a copywriter. I want the final copy to be best it can be.
I appreciate it!
I find the way you write enjoyable, free-flowing and absolutely understandable, but there are quite a few instances of expressing things in an subtly unnatural way, which detracts from the otherwise great experience. Perhaps this isn't the best example (and some things are subjective too), but to illustrate what I'm saying:
> You’ll even know how to show your CPU usage and memory via the status line.
I would rewrite that to:
> You’ll even find out how to show your CPU usage and memory via the status line.
Or even better:
> I'll even show you how to display CPU and memory usage right at your status line.
That's probably the most basic usage for TMUX, but somebody please enlighten me, what are some 'advanced' uses? How much more than splitting screens is there? Honest question.
So for the nginx edit conf/restart server scenario you would:
`fg` in the shell will then bring the Vim session back to the foreground.
If `:sh` doesn't give you your command history and the same working directory, that might be convenient.
1. Hierarchical context management. I use different sessions for different projects. One session might have my main development work, one session for a random debugging session for a coworker, one session for a side project or project euler challenge. Within each session I usually have multiple windows. For main development I have one window that has source code and development, one window for testing, and one window for command line/ data wrangling. Within each window I might have a couple panes, for example in testing I have a split screen with testing code on the left and the command line for running tests on the right.
2. Multiple paste buffers. Recently I had 3 or 4 environmental variables I was setting on some different devices. I stuck them into different copy paste buffers and went to town instead of repeatedly copying and pasting from a document.
3. Alerts. I'll often have a few jobs that run for between an hour and a couple hours that I want to just start and forget about. When they're done you can have tmux give you a notification on the window that the job was in and you can go check it out and do more work.
Minor, but interesting use cases:
- share tmux sessions with coworkers. I haven't done this as much but it's great for remote debugging.
- process persistence. Use this all the time. No more nohup & business.
- naming windows. I name almost all my windows like "test" or "hardware".
- moving windows and panes around. You can move panes to different windows and windows to different sessions really easily.
- save tmux state before shutdown. There's a separate plugin that does this but you an actually write your current session to disk and load it up again when you restart.
EDIT: formatting
So basically I set up a tmux session with panels for all those things. It was a good way to keep it all running without needing to always have it "open" per se.
Also it's handy for running certain services/programs in the background when I ssh into a server.
Highlights for me: better support for vertical splits/panes, better mouse support, and more convenient scripting features (for instance, integrating xclip and the tmux copy/paste buffer).
It's possible that screen has caught up in the last few years, but I haven't followed its development.
By the way, I think the first section should be 'foreword', rather than 'forward'.
I shy away from preorders. Do you have a sign up list of when this is done