You are not logged in.

#1 2010-08-27 22:01:17

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

TMUX Where's my tmux.conf ? [SOLVED]

Installed tmux from the community repo.

Everything I can find says my tmux.conf should be in /usr/share/tmux/ or ~/.tmux.conf , which I interpret as a hidden file in my /home/jeff folder.

No sign of a tmux.conf on my system.  There is however the following in the /usr/share/tmux/ folder.

/usr/share/tmux/h-boetes.conf
/usr/share/tmux/n-marriott.conf
/usr/share/tmux/screen-keys.conf
/usr/share/tmux/t-williams.conf
/usr/share/tmux/tmux.vim
/usr/share/tmux/vim-keys.conf

So do I have to create a tmux.conf to modify? If so, why no documentation?

Last edited by jeff story (2010-08-28 10:52:17)


Check out my website for info on the Arch Linux Installer

Offline

#2 2010-08-27 22:07:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,002
Website

Re: TMUX Where's my tmux.conf ? [SOLVED]

You copy one of the examples (I used Thayer's) to ~/.tmux.conf and begin modifying from there.

I think it actually makes good sense to ship it with four pre-made conf files, each having slightly different options, so that you get a good feel for working examples. Over time, I have cannibalised bits from each of them...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-08-27 22:11:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: TMUX Where's my tmux.conf ? [SOLVED]

Offline

#4 2010-08-27 23:13:52

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: TMUX Where's my tmux.conf ? [SOLVED]


From the wiki:   
Configuration files can be found in /usr/share/tmux/. By default, the escape keys are C-b (where C- is the control key)

I read and actually added the "Basic Window Handling With Default Configuration" section to the wiki.

I think I must be missing something very simple. Where is the default tmux.conf that tmux is using?
Does it run without a conf file, or does it use one of the supplied list as default?

If I want to keep everything as is, and just change the ctrl+b key to ctrl+a key, without changing anything else, how would I do that?

If I for example, I change the name of one of the supplied example configs to tmux.conf, how would I know what the defaults were?

Last edited by jeff story (2010-08-27 23:15:29)


Check out my website for info on the Arch Linux Installer

Offline

#5 2010-08-27 23:30:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: TMUX Where's my tmux.conf ? [SOLVED]

/usr/share/tmux/t-williams.conf is Thayer Williams' tmux.conf mentioned by jasonwryan in post #2.

http://tmux.cvs.sourceforge.net/viewvc/ … /examples/
Seems that there's no tmux.conf.

http://tmux.cvs.sourceforge.net/viewvc/tmux/tmux/FAQ
* Why is C-b the prefix key? How do I change it?

The default key is C-b because the prototype of tmux was originally developed
inside screen and C-b was chosen not to clash with the screen meta key. It
also has the advantage of not interfering with the use of C-a for start-of-line
in emacs and the shell (although it does interfere with previous-character).

Changing is simple: change the "prefix-key" option, and - if required - move
the binding of the "send-prefix" command from C-b (C-b C-b sends C-b by
default) to the new key. For example:

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

Offline

#6 2010-08-27 23:42:49

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: TMUX Where's my tmux.conf ? [SOLVED]

Couldn't you also just create a custom ~/.tmux.conf, add the one changed setting you want, and see if it uses the defaults for the rest?  Often times that will be the case.  As for which one the default is - I have no idea, it's possible that they are coded into tmux itself.

Hope that helps,
Lswest


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#7 2010-08-28 10:51:15

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: TMUX Where's my tmux.conf ? [SOLVED]

Karol, thanks for pointing out that there is not a default tmux.conf. 

lswest, I tried your suggestion and it worked perfectly.

I creating a blank tmux.conf file and started one change at a time. I discovered that if I wanted to restore to a default setting, just delete the change made and restart tmux.

I want to use tmux to monitor a server, real time. All I need is the ability to split the terminal and navigate between panes, using keys that make some kind of sense to me.
I've accomplished that on my desktop, so I'll install it on my server now.

My TMUX Functions:

split: create horizontal line   ctrl+a then h
split: create vertical line        ctrl+a then v
to switch between window panes: ctrl+a   then use arrow keys
to resize a split: ctrl+a, release a  (but keep ctrl)   then use arrow keys


My very simple custom tmux.conf:

# status bar colors etc
set-option -g status-bg black
set-option -g status-fg blue
set-option -g status-interval 5
set-option -g visual-activity on
set-window-option -g monitor-activity on
set-window-option -g window-status-current-fg white

# command prefix 
set -g prefix C-a  

# start window indexing at one instead of zero
set -g base-index 1

unbind % # remove default binding since replacing
bind v split-window -h
bind h split-window -v

Quote jasonwryan :

Over time, I have cannibalised bits from each of them...

I did exactly that!


Check out my website for info on the Arch Linux Installer

Offline

#8 2010-08-28 10:59:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: TMUX Where's my tmux.conf ? [SOLVED]

If you have found your answer, please mark the topic as [solved] :-)

Offline

#9 2010-08-28 20:19:33

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: TMUX Where's my tmux.conf ? [SOLVED]

I updated the wiki to reflect what I figured out.
Arch tmux wiki http://wiki.archlinux.org/index.php/Tmux#Configure


Check out my website for info on the Arch Linux Installer

Offline

Board footer

Powered by FluxBB