tmux is terminal multiplexer software, allowing users to work with terminals using multiple windows and panes, which can be created, removed, attached, and reattached as needed.

learn more… | top users | synonyms

52
votes
2answers
11k views

vim freezes inside tmux

I'm using split panes in tmux - one being vim, other shell. Sometimes, around once a day, vim freezes. I can move between panes, perform any tmux commands, just vim doesn't react to anything. This ...
0
votes
0answers
2 views

Tmux on Mac: How to bind “option” key?

I am adding this to my ~/.tmux.conf file and running tmux source ~/.tmux.conf but it's not working set -g history-limit 100000 bind-key -n M-n next-window <--------------------- does not work ...
2
votes
1answer
13 views

Tmux - Detach client fails if using bash startup script

Typically, I use a bash script to create my tmux session (split panes, set PWD, call commands, etc.). This works great, except if I try to run tmux detach-client. It will fail to detach, instead just ...
2
votes
3answers
899 views

Is there a way to persist tmux sessions across reboots?

In particular, can the tmux session data be written to a file, and reloaded on reboot? I'm thinking of something similar to Vim's mksession command.
0
votes
0answers
7 views

tmux - change status-bg when in an ssh session window

Is it possible to have a different status-bg color when in an ssh session? Say I have the default green one, but would like it to turn red when in a ssh session. Should work when switching windows ...
0
votes
0answers
5 views

neovim not schemecolor on tmux multiplexor

I dont know why I dont have schemecolor when I use tmux on my neovim, here something of data of my console: gnome-terminal tmux 1.9 neovim this look so: I try a lot of this possible solutions but ...
0
votes
1answer
17 views

Tmux keybinding to swap pane left or right

I'm aware that :swap-pane -U and :swap-pane -D will swap panes up or down, but I'd like a keybinding to swap panes left and right. The only way I can think of to do this would be to first determine ...
4
votes
1answer
653 views

Run command in detached tmux session and log console output to file

I can run a command in a detached tmux session with: tmux new -d 'while true; do date; sleep 1; done' I can run a command in an attached tmux session and log the console output with: tmux new ...
2
votes
3answers
68 views

tmux configuration stanzas based on Tmux version

This question is loosely related to this one. So I am using a range of Tmux versions between 1.5 and 2.2 on various operating systems (and Linux distros). My ~/.tmux.conf which had been tailored to ...
57
votes
18answers
38k views

What's the least conflicting prefix/escape sequence for screen or tmux?

Screen goes with Ctrl+A. tmux on the other hand—as developed within screen—uses Ctrl+B. Both keystrokes, however, are also used in editors, shells, etc. Thus choosing either one degrades ...
1
vote
0answers
81 views

xterm translations: sending multiple keys

I'd like to utilize the multimedia keys on my keyboard in my xterm/tmux. I'd like to map the XF86Launch8 to the keys C-a F1 (ctrl-a being the tmux prefix key, the press F1, which is mapped in tmux to ...
0
votes
0answers
8 views

How do I { maximize | zoom } the current pane in an iTerm2-integrated tmux session?

How do you zoom the current pane if you're using tmux through the iterm integration? Iterm has its own zoom pane key sequence (by default, shift+cmd+enter), but it only seems to work on native panes, ...
0
votes
1answer
100 views

OS X terminal eating the shift key

I'm switching from iTerm 2 to the stock OS X 10.8.5 terminal (work policy, iTerm isn't on the approved software list). In my tmux configuration, I've mapped shift-left and shift-right to change ...
0
votes
0answers
4 views

How can I display a tmux pane only when the output changes?

I'd like to display the output of a static-analyzer only when there is output to display (most of the time, it simply outputs “No errors!”). When there is something to say, it spits out a ton of ...
211
votes
13answers
66k views

How do I reorder tmux windows?

In screen, I can just type C-a :number 0 to move a window to the top of the window list and push all the other windows down one. What's the equivalent command sequence for tmux? I looked at the man ...
1
vote
1answer
31 views

tmux mouse mode is being disabled somehow during a session

Sometimes while I'm working, I notice that tmux is no longer responding properly to mouse controls (usually as I try to scroll back a pane using the mouse wheel and get iTerm2's own scrolling ...
7
votes
1answer
590 views

Display unicode in tmux?

This is urxvt without tmux This is urxvt with tmux and utf8 not enabled in the config This is urxvt with tmux and utf8 enabled in the config How can I make tmux act consistent with the ...
0
votes
0answers
16 views

tmux copy-mode with vi keys bind C-R and C-S like in emacs mode

When I've used C-b [ to enter copy mode, I really like the vi keybindings for navigation but not for searching. Is there a way to bind C-r to ? and C-s to / in vi-copy mode quickly? I've seen some ...
1
vote
3answers
23 views

Two sets of windows side-by-side in tmux

I like to have two sessions/sets of windows side-by-side, with independent windows switching, like on the screenshot - right now I do that by launching two separate Konsole instances, each with tmux ...
3
votes
0answers
241 views

Tmux copy the selection to /dev/clipboard without key-mapping

Many answers related to this topic suggest to map Ctrl+y to a command that pipes tmux show-buffer to xclip. In the specific case of cygwin, the correct way to interract with the Windows clipboard is ...
5
votes
2answers
2k views

Tmux copy-pipe with mouse selection

I use copy-pipe on OS X to share the system clipboard with Tmux 1.8: unbind -t vi-copy Enter bind -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" This works when entering select mode ...
1
vote
2answers
466 views

tmux on a Mac: how can I move the divider lines?

On my Linux system I use prefix (redefined as Ctrl+a for me) that Ctrl+arrow to move the divider line but this isn't working on my new Mac. Any idea how I can move the divider lines?
0
votes
0answers
8 views

How do I setup a tmux session to always use a particular scl?

I'd like to be able to setup a tmux session that more or less transparently runs everything in a particular scl environment, specifically scl enable python27 .... By transparently, I mean that when I ...
0
votes
0answers
14 views

Tmux mouse selection resets scrolling position

When I scroll in a pane, my current shell prompt is not on the screen anymore, then I select anything (for example when I am explaining to a colleague something, just to point a line), the result will ...
1
vote
0answers
20 views

OSX smooth scrolling in tmux

I'm SSH'ing into a linux box using iTerm2. On that box I run tmux 1.6. I have enabled mouse mode: set -g mode-mouse on This works fine, and I can scroll when using tail, but it's not the same ...
4
votes
1answer
89 views

tmux - uppercase “M” at the right of window name

For some reason, occasionally, an uppercase M appears at the right side of the window name, so the window name looks like this: 1:bash*M I'm pretty sure is because I'm pressing some combination that ...
2
votes
2answers
2k views

watching output of “ps aux | grep blah” in tmux will not work?

I am trying to run this - watch "ps aux | grep myShittyProcess" in a tmux session. This process myShittyProcess was also started in a tmux session. The ps aux works without watch command. But as ...
1
vote
0answers
21 views

tmux: get names of panes, each current directory and history

my tmux session is a bit broken, by which I mean that tmux ls returns an error like error connecting to /private/var/folders/d0/xbg08_x12lddw3dkht5w462c0000gn/T/tmux-501/default (No such file or ...
5
votes
2answers
4k views

Option key does not work as Meta in Tmux

I am using Mac OSX Lion. I have checked "Use Option key as Meta" in Terminal preferences. Although the Option key seems to work fine as Meta in Bash, when I use it in Tmux (over SSH) it does not work ...
1
vote
1answer
16 views

How to run aliases under tmux without root privilege

Under terminal multiplexer tmux I am unable to use alias as a normal user. alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' For alias of alias l I have to type ls ...
1
vote
1answer
38 views

tmux mouse passthrough mode?

How do you make mouse-wheel scrolling in tmux work with programs such as less and man? It will work properly with emacs and vi/vim in xterm mouse mode, but less doesn't. EDIT Is there a way to have ...
11
votes
7answers
15k views

rename tmux window name to prompt_command, ps1 or remote ssh hostname?

I would love to be able to have my tmux window title automatically renamed to prompt_command, ps1 or just the hostname of a machine I ssh to. having 9 windows opened labeled "ssh" is really useless. ...
0
votes
2answers
25 views

Pass variable to another pane

I'm working with tmux and I'd like to pass some information from one pane to another. For example in first pane i've got the folder by pwd command and instead of copypast to another pane I want to ...
2
votes
3answers
531 views

Create custom command in tmux

I know how to bind a key to a command in tmux, but I want to create a custom command (that you can type with prefix key + colon). In this custom command, I want to execute a couple of other commands. ...
1
vote
2answers
207 views

Zsh autocomplete function with sed

I'm struggling to write an ZSH autocomplete function. My goal is to autocomplete ta's and tk's first argument with the projects listed in tmux list-sessions and tmuxinator list. Here's what I have so ...
0
votes
0answers
13 views

How do I send, through hotkey, a SIGINT (CTRL+c) to a process running inside tmux?

When I open tmux and start a long running process without output, how do I kill it with a hotkey Ctrl+c? On a normal zsh shell when I press Ctrl+c the process receives a INT signal and (hopefully) ...
0
votes
0answers
20 views

tmux bind-key breaks enter key functionality

I'm new to tmux. With the following set in ~/.tmux.conf, I can switch panes by specified keys in each line without the prefix, which is as I expect. bind-key -n C-j select-pane -L bind-key -n C-m ...
1
vote
0answers
66 views

Can tmux display pretty pane corners?

I'm in the process of picking up tmux, and I'm sure I'll get used to it, but this pointy edge is bothersome. Is there a way to make the corner flush, like this (fixed with gimp)? I know that the ...
0
votes
1answer
22 views

What is the right way to launch tmux in Terminal.app on OS X

I have ... if [ "$TMUX" = "" ]; then tmux; fi ... in my .zshrc which works great for ssh connections. However, I have trouble with Terminal.app. When I type exit, tmux closes, but I am left in an ...
0
votes
0answers
10 views

Tmux incorrectly interpreting aixterm escape sequences

It has just occurred to me that tmux misinterprets aixterm escape sequences (in my PS1 prompt, I use the bold attribute for bolder text and aixterm sequences for brighter colors), if my TERM variable ...
1
vote
1answer
50 views

How can I make a searchable shortcuts cheat sheet?

So, just like most people it happens that my memory for shortcuts and commands is kind of bad until it gets into muscle memory, but since it is just painful to have a fancy configuration in vim + tmux ...
34
votes
2answers
7k views

How to switch between two latest windows in tmux?

screen has a Ctrl-a,Ctrl-a to switch between two latest windows? How to do it in tmux?
613
votes
8answers
254k views

How do I scroll in tmux?

I just started using tmux, and I really like it, but I need to be able to scroll within the buffers/panes/windows I have open. I don't care if it works with the mouse or not. When I search the tmux ...
0
votes
1answer
35 views

How can I move my current session from GNU screen to tmux?

My IRC client, irssi, is currently active inside a GNU screen session. In hindsight, I wish that I'd have used tmux instead of GNU screen. How can I migrate the active process (or session) from GNU ...
1
vote
2answers
253 views

Tmux: Automatically run a Git command whenever I switch to a pane?

I would like to have a tmux pane where everytime I switch to it runs a command like git diff so that I automatically see the new version of the output. Can this be done?
69
votes
3answers
23k views

Move pane to a new window in tmux

I know that it's possible in tmux to join a window as a pane, but is it possible to move a pane to it's own window (tab)? I tried searching it up the man page but couldn't find it. I guess it is ...
1
vote
0answers
51 views

Change mintty title according active tmux window (cygwin)

How can I change mintty terminal title to show title of active tmux window? For example: I would like in this case title to be active tmux window - ncmpcpp or even better if possible title ...
0
votes
0answers
16 views

tmux new window with current_pane_path always goes to root

I have the following config bind-key -n M-c new-window -c "#{pane_current_path}" \; Now, when i invoke this command, it creates a new window but it goes to root director \. I am running tmux ...
0
votes
0answers
14 views

tmux how to send keys after the creation of a new session

Messing around with tmux, I've (more or less) understood how to use config files (either .tmux.conf or custom ones), and the usage of source-file command. So I edited .tmux.conf like this: new -s ...
12
votes
2answers
2k views

tmux — any way to enable scrolling, but not selection?

I like that when mode-mouse is on in tmux, I can scroll through the buffer, but I don't like that I can't copy stuff to my OS clipboard by selecting it (as when tmux is disabled). Question: Is there ...