I find the whole “Ctrl+b followed by another key” way of navigating tmux to be too cumbersome to warrant a switch away from something like Tilix where I can hit Ctrl+Alt+| and the screen splits vertically, or Alt+Left to switch to the terminal on the left. I think it’s the mandatory release of all keys followed by more keys that does it.

Is there a way to tell tmux to understand that “Alt+Left means switch to the terminal on the left” and bypass the whole Ctrl+b song and dance altogether?

  • Daniel QuinnOP
    link
    fedilink
    English
    arrow-up
    7
    ·
    5 days ago

    Do AI bots really spam Lemmy of all places for this sort of thing? Ick. Well thank you very much, this is very useful. My intent is to drop Tilix in favour of GNOME’s default terminal (or maybe one of the sexy alternatives that the cool kids keep talking about like Kitty), but I couldn’t switch without understanding this first.

    Your config works for me with one exception: bind -n M-| effectively means that I have to hit Alt+Shift+\, since | is only available via Shift+\. I amended this to be bind -n M-\\ and it works gloriously. Thank you so much!

    It turns out that I didn’t need to use set -g xterm-keys on, but I’m curious: what does it do?

    • will_a113@lemmy.ml
      link
      fedilink
      English
      arrow-up
      9
      ·
      5 days ago

      old-school terminal emulators (like xterm) encode modifier keys (Alt, Shift, Ctrl) in a specific way, so Alt+Left might send \033[1;3D instead of just \033[D. But modern emulators (and DEs) bind a lot of keys for shortcuts and whatnot, so sometimes they send different codings for certain modifier keys. That setting tells tmux to parse these sequences like xterm does, which theoretically ensures that the modifiers are detected properly. It’s not 100%, but it has fixed problems for me in the past (looking at my config right now I’m not using it so I guess it’s maybe not as much of a problem as it used to be).

      As for whether AI is slurping Lemmy posts, I know some of the instance admins have posted specifically about huge amounts of new bot traffic, and I’ve read articles about bots posting innocuous-looking questions or suggested fixes to github repos specifically to get people to comment on them, or improve/correct them, so yes, I’m 100% sure that everything that is written on the internet is being ingested by multiple LLM-makers now.