There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

kbin.life

barkingspiders , to linux in Any neat tmux configurations out there?

your pipe-pane command was real neat, I appreciate you sharing!

I get frustrated with the default ESC delay so I use set -sg escape-time 0

I re-bind the bind-keys without the default -r to avoid switching panes, hitting $DIRECTION arrow and going to the next pane $DIRECTION instead of my intent to move the cursor or view history etc…


<span style="color:#323232;">bind-key    Up      select-pane -U
</span><span style="color:#323232;">bind-key    Down    select-pane -D
</span><span style="color:#323232;">bind-key    Left    select-pane -L
</span><span style="color:#323232;">bind-key    Right   select-pane -R
</span>

lastly, I really like these plugins


<span style="color:#323232;">set -g @plugin 'tmux-plugins/tpm'
</span><span style="color:#323232;">set -g @plugin 'tmux-plugins/tmux-sensible'
</span><span style="color:#323232;">set -g @plugin 'Morantron/tmux-fingers'
</span><span style="color:#323232;">set -g @plugin 'tmux-plugins/tmux-resurrect'
</span><span style="color:#323232;">set -g @resurrect-capture-pane-contents 'on'
</span>

come on people, show us your filthy tmux conf

tal OP , (edited )
@tal@lemmy.today avatar

I get frustrated with the default ESC delay so I use set -sg escape-time 0

Hmm.

thinks

So, some keys on a terminal are encoded using the escape character normally sent by the Escape key and Control-[. The way the escape sequence is used is as a slightly-unreliable way to permit sending more types of keystrokes and modified keystrokes over an existing terminal connection, as you can send an escape character, but not have it interpreted as an escape key as long as whatever you transport is can move following characters prior to the guard interval expiring. That used to be pretty safe if your connection was a dedicated serial connection. Now it’s a little more-questionable, as a lot of links are traveling over stuff like wireless links and the Internet and can experience delays, so it’s maybe easier to exceed the guard interval.

As long as your link has relatively-little jitter, I’d think that you could maybe get away with lowering it.

But…if you set it to 0, I’d think that, absent terminal protocols changing, that you’d break use of a number of keys. Like, I think that Alt-sequences typically send escape.

kagis

Yeah:

superuser.com/…/consequences-of-escape-time-0-tmu…

Setting escape-time to zero interferes with tmux recognizing function-keys. Its manual page says

escape-time time Set the time in milliseconds for which tmux waits after an escape is input to determine if it is part of a function or meta key sequences. The default is 500 milliseconds.

The term “function key” applies to anything that has that format (including pageup, used in scrolling by tmux, and cursor-keys). 500 milliseconds may be excessive if you never work remotely. 20 milliseconds is workable for local connections. The analogous ESCDELAY in ncurses defaults to 1000 milliseconds; only a very small fraction of users find it necessary to change that.

And:

unix.stackexchange.com/…/whats-the-effect-of-esca…

You can see stuff that I’d think would be problematic by invoking cat and then hitting key sequences; if what you see starts with ^, then I think that setting the guard interval to 0 would break it. Alt-a is:


<span style="color:#323232;">$ cat
</span><span style="color:#323232;">^[a
</span>

I think that it’ll also break certain protocols that you probably don’t care about (but can still technically run over a terminal, like XMODEM).

Are you, perchance, a vimmer? I know that vi sticks Escape on critical functionality by default, so a lot of vimmers get really irritated at the guard interval. I’ve seen a number of people on vim just use a different key sequence for what Escape normally does (“jj” seems to be a popular choice, for some reason, I suppose because enough people don’t normally hit it). I’d probably use something chorded, like Alt-` (but then, I do emacs, so adding more-chords to things is just kinda the way to go…)

You can also double-tap Escape, and as soon as the second Escape character shows up, the other end will immediately interpret the first escape character as Escape.

tests

It looks like the second escape character will make it through, though. Dunno if that’s problematic in vim.

I expect that you can also reconfigure vim to use a totally different character or character sequence and reconfigure Escape to send that, though I don’t know if that would be problematic; one thing I’ve noticed that a number of vi folks like (and one reason that I think that it’s popular with some IT folks) is the ability to to use vi without further configuration, so you can get by on a foreign system that you’ve never seen before.

Just to hyperlink your above:

set -g @plugin ‘tmux-plugins/tpm’

Looks like this is the “[Tmux Plugin Manager”.

set -g @plugin ‘tmux-plugins/tmux-sensible’

Looks like this sets a set of default settings. Hmm. I’m not sure that I agree with all of these.

  • It sets the escape guard interval to 0; mentioned my concern above.

  • Increases the scrollback buffer length. Sure, that seems reasonable, especially if you turn off the scrollback buffer in any other virtual terminal that are also maintaining a scrollback buffer.

  • Increases the tmux display-message delay by several times, which determines how long messages from tmux remain on-screen. That seems legit; the default is really short.

  • Increase the rate of status-right and status-left refreshing. I don’t put much there, and generally, I think that that’s probably overhead that I wouldn’t get much from. I suppose that if someone put something that they needed to be pretty current there, that could be a real improvement.

  • sets TERM to “screen-256color”. I used to do this too (though I used xterm-256color) but I don’t today, and I don’t think that it’s necessarily a good idea. So, okay. The basic problem that this is attempting to fix is that TERM, as designed, has no “fallback” mechanism for if the remote end doesn’t understand the term type that you’re sending in TERM; it’d be much better if TERM looked something like “tmux-256color:screen-256color:screen:xterm-256color:xterm” or something, where the remote end uses the first entry that it recognizes, and then informs the other end which type it picked. This “you can only pick one TERM” type thing makes it really hard to introduce a new terminal type, because initially nothing works correctly with a new TERM type and attempting to ask the remote end to use a new TERM type that nobody supports yet means that you immediately see everything not work on most hosts. Back when, nothing had a tmux entry in its terminfo database, so when working with really old systems, they’d break, as the remote software wouldn’t know how to display things in a tmux terminal. But setting this globally just exacerbates the problem of systems not supporting tmux. And, worse, the screen and tmux protocols are not identical – I’ve (occasionally) broken things when trying to run tmux on a TERM impersonating screen, though it works a fair bit of the time. I think what I’d do is, if I had to work with an old host or two that didn’t have a tmux terminfo entry – and I wasn’t able to create them – then I’d just set TERM impersonating some terminal type that it does know about prior to connecting to that host. I bet that there’s some way to set this in ssh in a Host directive. kagis Yeah, it looks like OpenSSH has the ability to set TERM in a Host directive:

    serverfault.com/…/is-it-possible-to-change-value-…

    On 2021-06-04, “allow ssh_config SetEnv to override $TERM” was committed to openssh-portable, which sounds like it will let you set SetEnv TERM in ~/.ssh/config, such as in a Host directive. (Or it will let you as soon as a release is cut with this patch, presumably.)

    My guess is that for most people, having a Host directive in their ~/.ssh/config is maybe the least-intrusive way to deal with this for broken hosts until those hosts get updated.

I agree that impersonating screen in TERM is addressing a real issue…just don’t know if that’s how I’d go about solving the problem, due to the side effects.


<span style="color:#323232;">set -g @plugin 'Morantron/tmux-fingers'
</span>

Now, that’s interesting. It looks like a context-sensitive way to rapidly copy out of the current terminal. Basically, an form of using the copy mode optimized to reduce keystrokes and for very recent stuff (like, not in the scrollback buffer).


<span style="color:#323232;">set -g @plugin 'tmux-plugins/tmux-resurrect'
</span><span style="color:#323232;">set -g @resurrect-capture-pane-contents 'on'
</span>

Ah, okay, this saves and restores a tmux configuration (pane layout and such). I don’t use panes, but I could imagine that or a variant on it being useful. Emacs has a couple of different modes that do something kinda similar, like desktop-mode.

EDIT: Looking around, it looks like mintty addresses the Escape key guard interval problem by using a different escape sequence, as I was suggesting above. If more virtual terminals did that, that’d be neat and eliminate the problem for people who want to use the Escape key to, like, do stuff in software packages that treat it as “back out” rather than “send a literal escape sequence down the line”, but I suppose that any effort to change things is gonna run into the same “lots of hosts lack a current terminfo” problem that you’re trying to fix with the TERM=screen-256color thing above until they get updates, so it’d be a fix that’d take years to roll out. Still, if everyone had started on this like ten years ago, then the problem would be pretty much solved now…

barkingspiders ,

Gah, haven’t had to think about my tmux conf in like 5 years but here we go. This was quite the writeup, thanks for looking!

You appear to be exactly right about set -sg escape-time 0. I don’t think it’s ever caused me an issue but I am fortunate to have a very homogeneous environment and it looks like the tmux team circumvented me anyway. As of tmux 3.4:

If escape-time is 0, force to 1 instead

github.com/…/201a8d8e7eb0bf208918c698e64aa120864c…

and related discussion: github.com/wez/wezterm/issues/2060#issuecomment-1…

The only time I’ve been bit by the TERM value from tmux-sensible is when logging into junos boxes. In which case I need to export TERM=xterm-256color or arrow keys don’t work (among other things). Per the docs:

github.com/tmux/tmux/wiki/FAQ#why-do-you-use-the-…

I might try tmux-256color for a bit and see how it goes.

Anyway, appreciate the breakdown and the suggestions!

SatansMaggotyCumFart , to mildlyinfuriating in The US shouldn't have so many tall men

We should take the shins of anyone over 5’-10”.

That’ll teach them and the women of loose morals (and other things) who go for such tall men.

tal , to mildlyinfuriating in The US shouldn't have so many tall men
@tal@lemmy.today avatar

The US isn’t radically tall relative to the world as a whole. Taller than average, sure:

www.worlddata.info/average-bodyheight.php

The male average height in the Netherlands is 7 cm taller than the male average in the US.

cabron_offsets , to fediverse in UPDATE! Fewer than 20% of Lemmy Apps display posts accurately

Voyager, bruh.

TheAlbatross , to mildlyinfuriating in The US shouldn't have so many tall men

Go off!! Write more stupid shit!! I loved the first post.

Blackout , to pics in Olympic gymnast Giorgia Villa is sponsored by parmesan and takes many photos with a wheel of cheese
@Blackout@kbin.run avatar

She won gold before ever making it to Paris

CrimeDad , to pics in Olympic gymnast Giorgia Villa is sponsored by parmesan and takes many photos with a wheel of cheese

Wow.

netvor , to linux in Would being a Linux "power user" increase my chances of getting a job in IT/tech?
@netvor@lemmy.world avatar
  1. don’t call yourself “power user”

It might just be me but it gives off “I can set up a printer, yay!” vibes.

Blackout , to lemmyshitpost in 🦍 😁 ❔
@Blackout@kbin.run avatar

Nobody has ever asked for more teeth when getting a DJ

swab148 ,
@swab148@lemm.ee avatar

Speak for yourself!

rockSlayer ,

I’m generally not concerned about how much teeth my DJ has

DJDarren , (edited )

I never brushed my teeth enough as a kid, so I have fewer teeth than I’d like.

Vladkar , to lemmyshitpost in 🦍 😁 ❔
espais , to linux in Switching back to Windows. For now.
@espais@programming.dev avatar

I have a fun issue. I want to be on Linux but for whatever reason there is no audio support (and I’m not able to add code to the kernel to fix it) for my Lenovo Legion 7.

Seems to only be affecting a certain chipset but no audio is a problem. Bluetooth at least works but that isn’t good enough unfortunately.

Sanguine_Sasquatch , to pics in Seashell on a windowsill [OC]

I could be wrong, but isn’t that a shark egg?

brown567 , to science_memes in Hmmmmm....

Fundamental forces gonna fundamental force

MrVilliam , to memes in Black mirror episode

If anybody came to c/memes for a laugh, it is unfortunately one more step to check the profile of OP to find the real joke here.

Dude has a vendetta against people knowing the potential bias of media sources. Gee, I wonder why that might be 🤔

macattack , to linux in Switching back to Windows. For now.

I get it. I’m a year in and was pulling my hair out dealing w/ frustrating issues for the first few weeks/months. Smooth sailing now, but I don’t deny the learning curves that are possible.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines