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
(Score: 0) by Anonymous Coward on Friday May 11 2018, @04:48AM (2 children)
I'm doing it, Ma! I told you I was worth saving!
(Score: 0) by Anonymous Coward on Friday May 11 2018, @04:53AM (1 child)
some of my best friends are inflatable.
(Score: 2) by DannyB on Friday May 11 2018, @03:04PM
So are the president's. Thus, you're in good high class company.
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 3, Interesting) by Subsentient on Friday May 11 2018, @07:21AM (15 children)
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 3, Insightful) by RamiK on Friday May 11 2018, @09:48AM (2 children)
i3 [i3wm.org] solves the problem at the root cause. Though admittedly, you'd still want lxde (for lxappearance) and/or xfce around to adjust GTK themes and fix the odd glitch in some apps just in case. But I honestly haven't touched those in years...
compiling...
(Score: 1, Interesting) by Anonymous Coward on Friday May 11 2018, @11:08AM
at some point I was looking into this, but ended up using plasma (I still think of it as kde, but whatever), with multiple separate terminator windows that I tile using "xdotool" from inside the terminal.
I wrote a little script which takes desired grid shape/position as parameters, and then applies them to the current window.
once the terminals are in place, I can resize everything else with "snap" functionality.
this works beautifully on my 3840x2160 display.
(Score: 2) by JNCF on Friday May 11 2018, @04:43PM
i3 locally, tmux remotely, vim either way. Tiles in tiles in tiles, dawg.
(Score: 2) by DannyB on Friday May 11 2018, @02:41PM (11 children)
tmux (or screen) are what you want when you SSH into a system that doesn't have any GUI.
Yes, such "headless" Linux configurations actually do exist. Both on Cloud Servers (VPS), and on headless Raspberry PIs.
Otherwise, Terminator sounds like a nice GUI program. But in a GUI, I've never needed anything more than multiple tabs in a terminal emulator.
Here is something that should be obvious, but seems to have escaped the attention of enough people to surprise me. A remote headless system with SSH allows you not only to get a multiplexed command line interface, but also to remotely view and manipulate its file system! Yes, really. SSH allows you to remotely manipulate the file system. You can use FileZilla on any platform. Or any SFTP type program (like on a Mac). Or WinSCP on a Windows. On any Linux desktop your typical File Manager can accept a URL like:
sftp://danny@somewhere.com/home/danny/foobar/fop
(where "fop" is "failure oriented programming")
If you need to do heavy-duty editing, more than you would do in VIM, then simply drag-drop the file to your desktop, edit it in favorite Whizbang IDE, and drag it back. Pretty simple.
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 2) by Subsentient on Friday May 11 2018, @04:45PM
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 2) by Subsentient on Friday May 11 2018, @04:48PM (5 children)
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 2) by DannyB on Friday May 11 2018, @07:31PM (2 children)
I've never tried it.
With PIs, they might get rebooted a lot.
With a VPS, it might be worth a try.
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 2) by Subsentient on Saturday May 12 2018, @05:49AM (1 child)
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 2) by DannyB on Monday May 14 2018, @03:46PM
I'll have to check that out. Thank you.
Even better is if it could reconnect when the "client" has a roving IP address. (Moving between WiFi and cellular networks.)
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 2) by DannyB on Friday May 11 2018, @07:35PM
I'm not saying YOU weren't aware of what I pointed out, but I am surprised at people that don't realize that -- hey I've got a GUI at MY end. GUIs are a wonderful productivity invention (decades ago) that are to be embraced. But still there are systems that are (and probably should be) GUI-less. (Hear that Microsoft?)
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 2) by Nerdfest on Friday May 11 2018, @07:40PM
I fucking love SSHFS. Mounting remote machines as file systems is extremely handy, and adds to the "defense in depth" approach.
(Score: 3, Interesting) by TheRaven on Friday May 11 2018, @05:11PM (3 children)
I don't care if the remote system doesn't have a GUI, my local one does. My terminal emulator sets a UUID in an environment variable, so I use a small script to ssh to remote systems that sets up a tmux session at the remote end with that name and uses autossh. If I move between networks, or reboot my local machine (or just restart the terminal program) then all of my connections are restored.
I would love to have something that does less than tmux. It's always an uphill struggle to convince tmux that I don't want it to take over from my terminal emulator (for example, I need something in my tmux config to say 'hey, you're running in a terminal that supports unicode characters, which you could tell if you weren't stupid, just pass through UTF-8 characters from the remote system to my terminal'). I want something that creates a tty on the target system, buffers input whenever I'm not connected, sends it all when I am, and does nothing else. My local terminal has scrollback. My local terminal has the ability to create multiple windows and tabs. My local terminal has selection and copy-and-paste. My local terminal does all of the things that tmux tries to do, better than tmux does most of them.
sudo mod me up
(Score: 2) by DannyB on Friday May 11 2018, @07:33PM
What I would love is something like SSH that allows the "client" end to have a roving IP address. Like a mobile phone or Pixelbook that may be on various WiFi's, or cellular IP addresses.
I looked at Mosh, but I don't think it does everything SSH does.
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 0) by Anonymous Coward on Friday May 11 2018, @08:32PM (1 child)
abduco is what you want. I only use tmux on my OpenBSD machine because it's in base (and even there only in my urxvt-kuake script because tiling+virtual desktops mean I can just open another terminal, no need for tabs and all that), for everything else I use abduco.
(Score: 2) by TheRaven on Sunday May 13 2018, @07:42AM
sudo mod me up
(Score: 5, Interesting) by VLM on Friday May 11 2018, @01:11PM (3 children)
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
(Score: 2) by DannyB on Friday May 11 2018, @03:09PM
Definitely agree with 3!
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 1, Interesting) by Anonymous Coward on Friday May 11 2018, @07:04PM (1 child)
fish is awesome, it is like a fast zsh
(Score: 2) by VLM on Friday May 11 2018, @07:56PM
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.
(Score: 1, Interesting) by Anonymous Coward on Friday May 11 2018, @01:29PM (4 children)
Liar!
Liar!!
Liar!!!
I've had the misfortune of installing tmux on an embedded system where locales is not available. Tmux shat itself and failed to run. I needed to delete all the locales shit from the tmux source code to get it to work. There wasn't any runtime configuration to disable locales. There wasn't any compile time option to disable locales.
Tmux is piss poorly written fucking shit that only ever works right on the author's own box and nowhere else.
(Score: 2) by VLM on Friday May 11 2018, @01:31PM (1 child)
And then there's screen, where some parts of the source code are a little mysterious.
(Score: 2) by DannyB on Friday May 11 2018, @02:45PM
If I don't have to see how the hamburger is made, then maybe I don't mind too much.
Q. How much did Santa's sled cost?
A. Nothing. It was on the house.
(Score: 0) by Anonymous Coward on Friday May 11 2018, @05:34PM (1 child)
tmux expects a system with UTF-8 support. Period.
It doesn't need to be able to display UTF-8 to the screen, but internally, it depends on having UTF-8 support available.
(Score: -1, Troll) by Anonymous Coward on Friday May 11 2018, @11:52PM
Fuck you, you worthless tmux apologist. You think I haven't seen that exact same shit excuse smeared everywhere? When all you're capable of doing is vomiting out the official excuse, you need to shut the fucking hell up.
I have fully functional UTF-8 support, asshole. What I don't have is locales. I know that's too fucking complicated for you to understand. Asshole.