You are not logged in.

#1 2010-04-09 21:46:31

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

[solved] tmux rebinding prefix doesn't work?

Hi everybody,

I decided to try tmux out, so I installed it and played around with it abit ... okay, it's pretty neat, but I've got to bind the keys to the same way I bound them for screen or I will go insane, so copy and paste, from the man page:

Commands to be run when the tmux server is started may be placed in the ~/.tmux.conf configuration file.  Common examples include:

Changing the default prefix key:

           set-option -g prefix C-a
           unbind-key C-b
           bind-key C-a send-prefix

So I stick

set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

in ~/.tmux, that unsets the "C-b" binding, (so I can't do anything), but it doesn't bind "C-a" successfully.  Has anybody here successfully rebound their prefix?

Last edited by pseudonomous (2010-04-09 22:16:14)

Offline

#2 2010-04-09 22:02:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] tmux rebinding prefix doesn't work?

This works for me:

# set prefix key to ctrl+t
unbind C-b
set -g prefix C-t

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-04-09 22:14:13

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

Re: [solved] tmux rebinding prefix doesn't work?

Hi, Jasonwryan.  Thanks for your response.

It turns out the problem was tmux wasn't automatically reading ~/.tmux, if I pass

tmux -f ~/.tmux

then I can get your config to work, I'll be the example from the man page works too.

Edit:

To elaborate on this problem, the file is supposed to be called "tmux.conf", not tmux.  This is what I get for not reading carefully enough.

Last edited by pseudonomous (2010-04-09 22:22:20)

Offline

Board footer

Powered by FluxBB