News for hackers. Stuff that matters.
Re:Tmux Tutorial by pw6hv on Tuesday September 24, 2019 @01:57AM (#21056963)
Looks like some of the shortcuts are really RSI prone, i.e. ctrl + b + & (where & is shift + 7). Are there any possibilities to have more wrist-friendly shortcuts?
Re:Tmux Tutorial by fountainofage on Tuesday September 24, 2019 @02:02AM (#21056983)
Not sure if you know this, but you're not pressing 4 keys at once. The ctrl + b part is the prefix sequence to let tmux know you want to send it commands. The order of key presses would be:

1) press ctrl + b

2) release

3) press shift + 7

You may already know this, and the RSI concerns still stand (I'm not sure what all goes into RSI risks), but wanted to clarify if the concern is over pressing 4 keys at the same time that are all over the keyboard.

Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @02:05AM (#21056997)
A very common change is to change the prefix to ctrl + a, like this in your tmux.conf:

  # remap prefix from 'C-b' to 'C-a
  unbind C-b
  set-option -g prefix C-a
  bind-key C-a send-prefix
I've heard that he reason for ctrl + b is because screen uses ctrl + a, which just doesn't make any sense to me. You can nest both tmux and screen and to get to an inner layer you press (if ctrl + a has been mapped) ctrl + a + a - and now your command is sent to the inner tmux/screen.

Defaults matter. It is not feasible to configure this on every machine you touch so one have to remember both the default one and the sane one...

Re:Tmux Tutorial by JerwuQu on Tuesday September 24, 2019 @04:09AM (#21057654)
I think another reason is because some people use Ctrl+a in bash for jumping to the start of the line.
Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @03:33PM (#21063718)
Thanks, that is a good point!
Re:Tmux Tutorial by abcdef123xyz on Tuesday September 24, 2019 @02:10AM (#21057020)
There is no consensus on the best prefix so there is no point in changing it after 10 years. Lots of people dislike C-a.
Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @02:14AM (#21057046)
I can imagine, what is best will likely depend on preference.

But at least the defaults should be sensible.

Re:Tmux Tutorial by abcdef123xyz on Tuesday September 24, 2019 @02:41AM (#21057185)
There is no agreement on what is sensible and what is not, the defaults are no more or less sensible than any other suggestion.
Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @02:50AM (#21057228)
Oh, yes there are.

C-b is terrible for your wrist, especially in conjunction with the following commands.

Choosing C-a isn't as much about preference as it is about not-terrible ergonomics. Now people are right to prefer anything other than C-a or C-b but C-a is objectively a much saner default than C-b.

Re:Tmux Tutorial by prsy on Tuesday September 24, 2019 @06:36AM (#21058434)
The problem is with ctrl positioning, there was a time when it was more commonly found on the home row [0]. Rebinding caps lock to control turns the motion from an awkward wrist snap to a slight spreading of your left hand fingers.

[0] http://xahlee.info/kbd/keyboard_ctrl_vs_capslock_position.ht...

Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @03:32PM (#21063710)
Personally I've bound caps lock to ESC, but given the emacs style shortcuts it does make sense. Thanks.
Re:Tmux Tutorial by u801e on Tuesday September 24, 2019 @10:04AM (#21060268)
> C-b is terrible for your wrist

I always use the modifier key on the opposite side of the keyboard to avoid that issue. So for ctrl-b , I press the ctrl key on the right side of the keyboard worth my right pinky and press the b key with my left index finger.

Re:Tmux Tutorial by abcdef123xyz on Tuesday September 24, 2019 @03:00AM (#21057293)
Absolute nonsense, are you trying to press C-b with one hand?
Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @03:08AM (#21057329)
Yes. Left ctrl is in a better placement on many keyboards. Also being able to perform shortcuts with one hand is very handy.
Re:Tmux Tutorial by abcdef123xyz123 on Tuesday September 24, 2019 @04:05AM (#21057626)
If it hurts your wrist pressing it with one hand, perhaps you should use two...
Re:Tmux Tutorial by tjoff on Tuesday September 24, 2019 @06:17AM (#21058324)
Or choose a shortcut that works with either.
Re:Tmux Tutorial by iamnotacrook on Tuesday September 24, 2019 @02:02AM (#21056982)
Yes choose what you want.
Re:Tmux Tutorial by archarios on Tuesday September 24, 2019 @02:10AM (#21057024)
use a better keyboard :P