Hacker News new | ask | show | jobs
by VikingCoder 2249 days ago
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 Wizard where it asks, "Do you use the mouse to copy and paste? Try to highlight this text: [example1]. Then try to paste it back into this screen." and etc.

Wouldn't this be... kind of an obvious thing to make?

6 comments

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.

Shouldn't tmux core devs be motivated to write a tool like this? Assuming they are interested in attracting more users.
If you're not motivated by altruism, I can't teach it to you.
Oh so many useful utilities to write. Folks often say "what should I do with my programming skills?" when there are endless tools, whos lack hold us back.

My favorite would be a tool that wrote a Linux device tree source file, by digesting the board schematic. Port Linux to your new device with one click! Of course, that would take away a large part of my contracts. I'd have to do some real work for a change.

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 literally thousands of free guides on the internet about how to do it yourself but people will gladly hand over their money to have someone that claims to be an expert do it instead.

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.
Depends on your contract. It’s not uncommon (or even necessarily unreasonable if you’re a full time employee) for a contract to stipulate that any code you write during the period of your employment that you make use of at work is owned by your company. I would imagine there are exceptions to this - I don’t think an employer could make a case that they own your Emacs scripts if you use them both at home and at work, and they certainly couldn’t try to take ownership of your side hustle that has absolutely nothing to do with your job - but for a fairly niche tool which produces value at your job, I think they’d be at least trying their hand at holding onto the IP if/when you leave, and restricting you from selling it on the side while you’re still employed. Probably also depends on the culture at your workplace and how decent your managers/bosses are.
It would be a good product.

To work well the schematics would have to be well-formed, there need be a chip database of pinouts, clocks, enables and address strapping, and Linux would need a dts schema (its ad-hoc now). Lots of spadework I guess.

Not if you keep it for yourself ;)
This is exactly what you're referring to and it was really straight forward and clear. The project is a theme for zsh

https://github.com/romkatv/powerlevel10k#configuration-wizar...

Just use 'byobu'. it's a pretty good starting point :)
No, it wouldn't. Your examples are mostly hints that it's actually your terminal emulator (which might also serve as your "SSH program" in cases like PuTTY) which might need a slap to behave correctly - and then your TERM environment variable and possibly LANG (UTF-8 support) should be set up correctly. tmux will work then.
A util like I propose would be able to 1) ask what term / ssh you're using, 2) ask you to demonstrate keystrokes and mice and determine if they're working, 3) offer suggestions for how to fix them.
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.