you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 1 month ago (6 children)

For me it was sending commands to named panes. Let me automate some pretty annoying apps that demanded to be run in an open console.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 1 point 1 month ago (5 children)

    Did you end up using send-keys for that?

    I've dealt with that kind of thing in the past, and one thing I wanted to do that I never found a good solution for was to make it so that a pane was "read only" in that it could be scrolled with a mouse, but accept key presses (with page up/down arrows doing scrolling as a stretch goal). Did you ever deal with that/find a solution?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 1 month ago (4 children)

    I've never tried scrolling with mouse but it does work with arrow keys and pgupdn.

    Yes to send-keys.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 1 month ago (3 children)

    Scrolling with a mouse works, just not exactly the way I thought it would when I started using it.

    I started out with a shell script using send-keys, and eventually decided the python tmux library was a nice improvement.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 1 month ago (2 children)

    Nice. I wrap send-keys with a little perl script, I should look into that Python lib.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    It's not bad at all. It gets monumentally easier if you've named all your sessions and windows because it's just a .get() to look them up. Panes still have that thing where the panes can get renumbered inside a window, but still have the same internal immutable identifier underneath the hood, but you wind up with pane.send_keys(my_string, enter=True) which is well worth the learning curve IMO.

  • source
  • parent
  • hideshow 1 child comment