4 ms·
tmux is a godsend, but there are a lot of things broken by default. I've been collecting a minimal set of nicities for a while now, if anyone is interested: h
by ohazi 7y ago
tmux is a godsend, but there are a lot of things broken by default.
I've been collecting a minimal set of nicities for a while now, if anyone is interested:
https://github.com/ohazi/dotfiles https://github.com/ohazi/dotfiles
Giving the man page a cursory skim is recommended.
- pizza 7y agoYou should take a look at the changes made for tmux 3. They’re going to break quite a few configs. It might also represent a new era for tmux, though, as it seems like the creator is adding some text UI primitives to it (eg the right-click menu). I also really love byobu, so it would be great to make it more powerful, too.
- ohazi 7y agoYeah, I've had to maintain multiple config files because Amazon Linux, Debian stable, Debian testing, Ubuntu, Raspbian, various Fedora versions, etc. have all had different tmux versions at different times, and upgrading locally involves some termcap stuff that wasn't always reliable. I fully expect to have to revisit this again soonish. But most of the tmux changes over the years have been clear positives, despite the config churn.
- inetknght 7y agoHonestly if I had one complaint about terminals, it would be any time, every time, and how often a CLI program decides it's talking to xterm-color and the renderer deciding for some reason that it doesn't like talking xterm, and somehow the character stream decides to "clear" the screen and move the cursor to 0,0, and none of the characters get erased and suddenly nothing is readable. It happens far too often. I wish TMUX would be capable of noticing and either fixing or suggesting a fix for that kind of garbage.
- ohazi 7y agoCompletely agree. The problem is that there are half a dozen ways for a program to figure out where it's running, but (poorly) pattern matching on $TERM is way easier than checking for individual features with termcap. It's also almost impossible to validate a program against different environments other than just manually trying as many as you can tolerate. Also there are lots of systems with broken/incomplete/incorrect termcap databases, so now you're looking at kludgy exception lists anyway. Tmux switched from using xterm- to screen- and then tmux- as its $TERM at some point, and adding a proper termcap entry, and it's mostly been a net positive, but some things definitely break as a result. The most annoying thing is that $TERM is inherited over ssh, but the termcap db isn't, so it's not enough to have your local programs configured correctly, you need to have the same config (or at least a workaround) available on all of the remote systems you use. Tldr: xterm- is ossified, and trying to do anything else, even the correct way, is a nightmare and often can't realistically be made to work.
- syn0byte 7y ago"setterm --reset" is the command you are looking for in most *nix systems.
- inetknght 7y agoBeen there, done that. It doesn't always work. It's particularly annoying with deeply nested terminals eg, xterm -> ssh -> tmux -> tmux -> ssh ... etc).
- butteroverflow 7y agoI see you're using the default prefix (C-b), with C-a being the 'recommended' alternative. I don't understand why it's so popular, as it breaks emacs-style navigation in readline applications, which is great for fixing typos/changing something in one of the previous commands. I remapped my prefix to C-q. It's a relatively useless key (who needs flow control these days?) and it's close to the number row — you can press it and then quickly get to a number key.
- sp332 7y agoscreen uses ctrl-a, so it was easier for people switching to tmux. Never did figure out why it was chosen for screen back in 1987. Emacs was around for 10 years by then but GNU Readline wouldn't be released for a few years yet.
- graywh 7y agoI use ctrl-_ which is generated by "ctrl 7" or "ctrl /" on the terminal emulators I use (xterm and iTerm.app)
- TeMPOraL 7y agoC-a also breaks Emacs-style navigation in readline applications (jump to beginning of line, a pretty useful function). And of course it breaks navigation in Emacs too (which I frequently use over SSH). C-q is also useful in Emacs, so my tmux is remapped to use C-^ as the prefix key. Nothing useful sits there for other programs, and I personally don't need the tmux prefix often (I do 90% of things straight from Emacs, and it has its own windowing capability).