Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Friday May 11 2018, @04:31AM   Printer-friendly
from the pimp-my-tmux dept.

Tmux is a well-written terminal multiplexer. It allows access to multiple separate terminal sessions inside a single terminal window or remote terminal session. It can do quite a lot when advanced configurations are taken into account. Here Gregory Pakosz' explains his pretty and versatile tmux status bar modifications line by line. His modifications look great and just work, combining form and function.

https://github.com/gpakosz/.tmux/blob/master/README.md


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Interesting) by VLM on Friday May 11 2018, @01:11PM (3 children)

    by VLM (445) Subscriber Badge on Friday May 11 2018, @01:11PM (#678346)

    No commentary on OPs tmux settings? I'll go for it, since I use tmux every day.

    1) OP's setting prefix2 to C-a, like why? I'm a C-z guy it just seems more natural. If you ever get stuck editing something remotely thru a SSH using emacs, you can "work around" something messing with C-z but its hard to emacs if something eats your C-a. I suppose if you never make any tpyos like me then you never need to edit a line, but whatevs OP.

    2) automatic-rename doesn't seem to do anything for me. Perhaps an interaction with my tabbed urxvt setup locally, version issue, maybe its a freebsd thing... Sounds like it would be interesting if it worked for me.

    3) OP is enabling renumber-windows which would drive me completely bonkers if I have multiple windows doing different things every time I switch I'd have a cache failure and need to check the status bar, no thanks. I kinda like muscle memory of "for the last couple hours C-z 6 has held a tail -F of some log file" and it remains C-z 6 until I'm done with my current task (or maybe much longer...) rather than until I delete 1 thru 5 and then I need to memorize its C-z 5 for awhile to see the same file. Naah no thanks. UIs need to be consistent not nicely numbered.

    4) OP is definitely a pane guy whereas I'm a window and tab guy. Just a different style. Everyone who's been around awhile remembers when they gave up on 80 col width for all terminals, for me it was, I think, 2013, but I still have a residual dislike of anything non 80x24 thus I dislike panes even though I'm OK with different resolutions now. So my point is OP is into things like rebinding previous-window and next-window, OK OP whatevs, but I'm more into many lines of "bind-key -n F1 select-window -t 1" so instead of C-z 3 I can just hit F3 and so on and so forth and what have you. Or another way of putting it is OP really likes relative addressing navigation of windows because OP is doing weird splitting things whereas I don't split so I prefer absolute addressing of my linear array of windows.

    5) OPs entire section of copy-mode incantations will require some time to digest and evaluate. The most interesting part of his config, or at least the one I'll put the most time into thinking about. What in a broad sense is OP trying to accomplish here? Looks interesting.

    6) Likewise, OP what are you doing with that section for default-command? Since I mostly just use bash, I don't need weirdness for multiple shells, so I'm rockin default-command "${SHELL}" Interesting, OP, but wouldn't it be better to use one shell instead of ... whatever you're doing? I googled up fish shell and first result was "Finally, a command line shell for the 90s" so whatevs OP. I guess bash is for really old 80s guys like me. Freakin noobs with their 90s shells, get off my lawn.

    7) OPs .tmux.conf.local strategy is interesting to me, not because I keep my tmux.conf on github for people to share (its pretty boring, 52 lines with whitespace and comments) but because I use shared NFS home dirs, I could experiment with .tmux.conf.local and if I F something up so badly I can't even reconnect anymore, from any other machine logged into my NFS home dir, I could simply rm .tmux.conf.local to roll back experiments without even having to edit the "real" file, which seems convenient for experimentation. Inadvertent good idea, OP!

    8) The last 1000 lines of spaghetti code to prove tmux can be turing complete programming language and do crazy status line tricks, yeah thanks but no thanks. I enjoy the easy debugging of my status-right '%Y-%m-%d %H:%M'. This is like towers of hanoi in SED or similar "my uni professor thought it would be cool weed out assignment but my boss would shoot me if I invested that much time into something so nonproductive" Classic academic vs professional taste. I do respect the obvious extreme effort care and quality OP put into it, but the overall style is unappealing to me. If you're going to do something weird in tmux, why not re-implement aes256-ctr for those who think their SSH has been powned by the NSA (as if it hasnt?) or implement a HTTP server in tmux so you can stick that sucker on port 80 and connect via a web browser to do your command line stuff. Mine a blockchain crypto with the algo written in tmux and shell, that would be impressive.

    9) A good idea I have that OP doesn't have is I new-window (well, neww is a synonym) a stack of bash shells because upon a fresh login thats the first thing I'd do anyway when working on something, so may as well automate it. Its possible OP was doing something like that in his 11000 LOC and I missed it. When I do stuff I usually use multiple windows so why not save the time, and when I don't use multiple windows the temporary memory cost of a couple unused shells is a rounding error since the turn of the century anyway.

    Most of my comments are style and workflow related, overall looks like a nice config, other than the status line ... stuff

    Starting Score:    1  point
    Moderation   +3  
       Interesting=2, Informative=1, Total=3
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 2) by DannyB on Friday May 11 2018, @03:09PM

    by DannyB (5839) Subscriber Badge on Friday May 11 2018, @03:09PM (#678409) Journal

    Definitely agree with 3!

    --
    People today are educated enough to repeat what they are taught but not to question what they are taught.
  • (Score: 1, Interesting) by Anonymous Coward on Friday May 11 2018, @07:04PM (1 child)

    by Anonymous Coward on Friday May 11 2018, @07:04PM (#678530)

    fish is awesome, it is like a fast zsh

    • (Score: 2) by VLM on Friday May 11 2018, @07:56PM

      by VLM (445) Subscriber Badge on Friday May 11 2018, @07:56PM (#678552)

      To us old timers, all shells are fast on modern hardware. Besides I'm not implementing 3-d rendering code or a bitcoin miner in bash, so I don't care if its 50% slower if it would be unnoticeable unless it were 3455158 times slower or whatever it is.