Hot answers tagged

4

tmux sets the $TMUX variable to point to the socket, so you can do something like if [ -z "$TMUX" ] then .... fi The stuff inside the test will only be run if the variable is not set - ie you're not already inside a tmux session.


2

You can do this in two ways: Use the sleep method. I see nothing really wrong about using sleep apart from sometimes failing if you choose a too short time. To fool-proof it, use while ! tmux has-session; do sleep 1; done or while ! tmux has-session -t alpha; do sleep 1; done Use something like xtoolwait that starts an X client (your terminal emulator)...


2

The most optimized solution to troubleshoot any detached script using tmux will require you to use the following option within your triggering script: #!/bin/bash # this script is called "sess" tmux new-session -d -s sess1 # this statement is a life-saver for tmux detached sessions tmux set-option -t sess1 set-remain-on-exit on # In my case running the ...


2

Different releases of Debian have different versions of tmux. Take a look at the package page for tmux. It seems that apt-get is looking at wheezy (a little old). The Debian releases-page shows how old: 2013 (and still being updated). By the way, you could be running Ubuntu or some other downstream distribution rather than Debian, but it's likely there ...


2

Smooth/frictionless/inertial scrolling is not supported by current tmux, mostly for reasons beyond its control. tmux receives its mouse input through terminal control sequences, so it's limited by what the terminal gives it. A popular reference for terminal sequences is console_codes(4), but that doesn't mention the mouse wheel at all. However, XTerm ...


1

If using Debian stable, and you have a package you want updated, you can use backports, as seen in https://backports.debian.org/Instructions/ in short: add "deb http://ftp.debian.org/debian jessie-backports main" (after main, can also add contrib and non-free, if using them.) to your sources.list, which by default is /etc/apt/sources.list (as root, or ...


1

When you start another window, it runs concurrently with the original window that executed tmux new-window. There's no way for the original window to know when the new window is done starting up. The best you can do is estimate how long it takes for it to start up, and sleep that long in the original window before enabling visual-activity and monitor-...


1

Checking the source code is the way to go: tmux only looks at the system's notion of the size in check-size, and before that, when attaching to or creating a session, it starts with 24x80. The latter is configurable with the command-line -x and -y options. The manual page lists this in new-session: The new session is attached to the current terminal ...


1

The manual page is not clear, but reading the source code helps: take a look at input-keys.c, and you will see the keys, listed in a table. the table is used in the same file, in input_key near the top of the file, there's a comment: /* * This file is rather misleadingly named, it contains the code which takes a * key code and translates ...


1

The tmux utility's own show-options command with the -g flag will dump all the globally set options in the current tmux session (i.e., tmux has to be running to use it). So if you're in a tmux session, your ~/.tmux.conf file is empty, then the following will dump out the default settings: $ tmux show-options -g >tmux.conf-default Some options are set ...


1

There should be several example configuration files in either /usr/share/doc/tmux/examples or /usr/share/tmux/. You can copy any of those over to ~/.tmux.conf to test out. Alternatively, you could create a ~/.tmux.conf with the default settings by using this command from within tmux: tmux show -g > ~/.tmux.conf This command works with tmux version 1.8....


1

When you have nested tmux sessions, it is the first ("outermost", oldest) that gets the Ctrlb+d key sequence to detach. You can set up tmux to send its prefix key to the "inner" session like this (in your ~/.tmux.conf): bind-key b send-prefix This will send the prefix Ctrlb (or whatever you use as prefix) when you press Ctrlb+b, so Ctrlb+b is basically "...


1

There are unrelated differences between Red Hat 6 and Ubuntu 16 for the screen-256color entry: the latter adds dim and omits initc. Neither of those changes is related to cursor-keys. Presumably the value of TERM outside tmux is xterm. There are also unrelated changes between the two systems for the xterm entry (the cursor color extensions mentioned in ...


1

Running these two commands will give this mapping: prefix, /,/ (you'll need to hit / twice.) which will put you into copy mode and then search-backwards bind-key / copy-mode bind-key -t vi-copy '/' search-backward Mapping / to search-backward causes you to (obviously) lose forward search which you might want because tmux sometimes puts the cursor at the ...


1

tmux (like GNU screen) works by translating the features of your actual terminal into an (often different) internal terminal. They do this to allow you to connect a session on different terminals at the same time, or at different times. When that works well, you will see the "same" text no matter where you are connecting from. Not all terminals support ...


1

It is working now. Here is a screenshot using the current imgcat script along with iTerm 3.0.2 tmux 2.2 (MacPorts) on OSX El Capitan (10.11.5): The developer is very active, and if it was not working last September there may be a related bug-report/issue number (there are many open issues mentioning imgcat).


1

The reason why an event-script fails to send a "growler" message is that mcabber closes the standard input, output and error streams when it runs an event command. You can see this in hooks.c: if ((pid=fork()) == -1) { scr_LogPrint(LPRINT_LOGNORM, "Fork error, cannot launch external command."); g_free(datafname); return; } if (pid =...



Only top voted, non community-wiki answers of a minimum length are eligible