Live data from Hacker News

Tmux for Mere Mortals

zserge.com

131–140 of 171 posts

Re: Tmux for Mere Mortals

#131
post #106
post #98

Earlier quoted context omitted.

They are local projects, but you can be ssh'd into another server from a tmux session / window. A tmux window or split window is just another terminal at the end of the day.

Having them remote also saves you from the window-update-hell, which annoys me no end. You can save the session and log out. As I said in another post, I was a heavy tmux user until I started using Fluxbox. But tmux definitely had advantages. Now in the WFH world it's a good opportunity to try to optimize the workflow again.

> Having them remote also saves you from the window-update-hell, which annoys me no end. You can save the session and log out.

Yeah, I mean there's nothing stopping you from throwing up a $5 / month DO server and having your code and dev environment all configured there and then just connect to that from anywhere. As long as your network latency is low it should be quite doable.

Personally I'm ok with keeping things local because I have a single workstation where I do most of my work but I can see how a fully remote set up could be beneficial for some folks.

Re: Tmux for Mere Mortals

#132
All I use tmux for is to reattach to sessions after a connection drops. The rest I just configure away as much as possible, but not quite as much as I want. Is there any simpler utility that only provides persistent sessions?

Re: Tmux for Mere Mortals

#133
post #121

Earlier quoted context omitted.

How are you setting your tmux colours in different environments?

I have this in my ~/.bashrc: declare -A TMUX_SSH_COLORS_TABLE TMUX_SSH_COLORS_TABLE=( \ ["server"]="fg=yellow bold,bg=black" \ ["router"]="fg=red bold,bg=black" \ ["desktop"]="fg=white bold,bg=black" \ ) function ssh { trap 'tmux select-pane -t:. -P "default"' RETURN for arg; do local arg_value="${TMUX_SSH_COLORS_TABLE[$arg]}" [[ -n "${arg_value}" ]] && tmux select-pane -t:. -P "${arg_value}" break done /usr/bin/ssh…

I hadn't thought of this approach. Thanks!

Re: Tmux for Mere Mortals

#134
post #109

Earlier quoted context omitted.

If you build it yourself you could easily continue those contracts with way less work put in. There's many, many jobs out there that exist only because people don't think they can read the documentation and figure out how to run things themselves. If the contracts start to dry up, offer it as an automated service. Look at how many people still pay to have someone install and configure things like Wordpress. There's l…

Only if he’s a freelancer. If he works for a company, they could just take this piece of work product that he made, use it in all the ways your just described, and then lay him off.

If they write it in their free time, they could offer to sell it to their company for 2x yearly salary or something. Got a buddy that has done that 3 jobs in a row.

Re: Tmux for Mere Mortals

#135
post #79
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

> You can't have it all with the mouse no matter your settings I don't think this is correct; it's just that it's not trivial to get things working well. As you say, it depends on using an up-to-date version of tmux (and sadly, you often can't run a config made for a new version with an older version of tmux). And you'll need your terminal to be up to the task (eg. iTerm2 on macOS; not sure what the best thing on Lin…

> can scroll with trackpad or mouse wheel inside and outside of Vim, click or drag to select text (and double-click to select words, triple-click to select lines) both inside and outside of Vim, I can drag tmux or Vim splits etc.

Doesn't this kinda defeat the point of Vim? I turned on vim bindings and went through an excruciating learning process just to keep my hands on the keyboard. Moving between keyboard and mouse or trackpad was causing significant wrist issues.

Re: Tmux for Mere Mortals

#136
Hmmm... I would find this extremely error-prone. Probably due to my own issues, but flipping through multiple remote sessions in tmux in the same window would get confusing after N=2 terminals.

But who manages THAT many remote sessions? Seems like an upstream problem to me, no?

Re: Tmux for Mere Mortals

#137

Hi there! I'm the author and maintainer of Byobu (byobu.org) here. Byobu started as "Screen for mere mortals", but eventually pivoted to work with Tmux, as well. Nowadays, Byobu is much more tightly tied to Tmux. You can think of it, as a super opinionated set of Tmux settings, easily portable across all of your machines. Happy to answer any questions here!

Does Byobu run best on Ubuntu?

Or is Byobu not (or not any longer) tied to any particular Linux distribution (I am an ubuntu user) ?

Re: Tmux for Mere Mortals

#138
post #88
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

Tmux on my local machine was useless. Tmux on my server has been a godsent. Just connect and re-attach to the tmux session and you are right where you left off. I did modify the key binds a little bit to make splitting windows and enable the mouse, but otherwise I just don’t need any more advanced behavior.

I use a terminal multiplexer (happens to be screen, but could as easily be tmux) to manage local contexts. A fresh terminal in the same context is then just three keys away. The contexts drive a number of things, but most importantly I set BASH_HISTFILE so each has its own history. I love it, but of course ymmv.

Re: Tmux for Mere Mortals

#139

Can someone please please make a util that configures tmux for me? I'd like to run a small program that generates a tmux.conf, after asking me some questions, and having me demonstrate my responses. So step one, it should be able to figure out what version of tmux I'm using. Then it probably needs to know what SSH program I'm using, so it knows how the keyboard and mouse from that program will mess with it. Picture a…

Yeah I always wonder why devs for such popular programs don't pause dev for a while and generate such utilities. Clearly they have the skills to do it if they can write tmux.

Re: Tmux for Mere Mortals

#140

Can someone please please make a util that configures tmux for me? I'd like to run a small program that generates a tmux.conf, after asking me some questions, and having me demonstrate my responses. So step one, it should be able to figure out what version of tmux I'm using. Then it probably needs to know what SSH program I'm using, so it knows how the keyboard and mouse from that program will mess with it. Picture a…

Necessity is the mother of invention. But I think you'll find that when you start writing something like that, you'll eventually learn enough about the config format that you'll no longer need a wizard to create the config for you. Then, it becomes hard to work on the wizard, because the necessity aspect is gone.

Another question to ask is, who would pay for it? A lot of people buy services for things that they can do themselves. But "we'll manage your datacenter" saves a lot more time than "we'll manage your tmux config file", and so is an easier sell. That is why there are an infinite number of cloud providers, or software for being your own cloud provider, relative to tmux config generators.

My point is... there is very little incentive to write such a thing. You won't make any money, and you won't use it yourself. Writing any software takes a long time, so you need some goal at the end. Payment and personal interest both generate a lot of motivation, but "some person I've never met saving a few minutes for free" rarely does. Thus, such a thing does not exist.

Post reply on HN