

Workflow in tmux - gnosis
https://coderwall.com/p/_g2vpq

======
bryogenic
I really like the status bar with the arrow-breadcrumbs look. I will
definitely be incorporating that into my config.

If others are looking for a great config to start out with definitely check
out Brian P. Hogan's tmux: Productive Mouse-Free Development [1]. It is a
great quick intro to tmux that demos and steps through the creation of a great
tmux.conf

[1] <http://pragprog.com/book/bhtmux/tmux>

~~~
th
The status bar with the arrow breadcrumbs is powerline:
<https://github.com/Lokaltog/powerline>

There are bindings for tmux, bash, zsh, vim, and ipython (among others).

~~~
eridius
The status bar with the arrow breadcrumbs _looks like_ powerline. If you read
his tmux config, he's not actually using powerline, he just duplicated the
appearance.

~~~
th
He is using the vim-powerline bundle for vim, but it looks like you're right
about the tmux config.

~~~
sathish316
tmux has its own powerline: <https://github.com/erikw/tmux-powerline>

~~~
jaredmcateer
Actually that's been deprecated in favour of the one powerline to rule them
all that "th" posted above.

------
Osiris
I understand using console window managers when logged into a headless system
where you don't otherwise have access to a UI, but I'm baffled by the desire
to use console-based window managers within well defined GUI like OS X.

In OS X, there are multitudes of tools to allow you to manage windows.
Spectacle is a simple one, Slate is extremely customizable.

Why not use the built-in OS X window manager to manager various windows rather
than a console-based one? If you say the advantage is the shortcut keys, Slate
lets you setup shortcut keys to do just about anything.

Can anyone give me a list of pros/cons for using a console-based window
manager over a native one?

~~~
joelhooks
it is lightweight, contained, and excellent if you have a "unix-like"
workflow. Typically I'll have a watch script, server, and vim in a given
window, and it is super compact. Some cons are probably the learning curve
required to see any advantage, and the fundamental lack of any respect for
mousing, which can be in the pro column for many.

~~~
Osiris
That's interesting. I practically never use the mouse to switch between
windows in OS X or Windows.

The biggest problem I have with tmux is vertical splits don't work with native
copy-paste because the selection goes across both panes. Using multiple
terminal windows, on the other hand, doesn't have that issue.

~~~
emidln
Native copy/paste typically requires a mouse. using tmux's copy-mode and
pasting doesn't require a mouse an still stays inside panes.

~~~
jasonlotito
Using a mouse, you can use tmux's new (in 1.8) pane expansion. prefix + z
causes the current pane to take up the entire window. prefix + z again and it
goes back to normal. Essentially, it's a maximized/restore capability.

~~~
joelhooks
rad, learned a new trick. thanks!

------
swah
OT: Tmux/Screen are a little bit RSI inducing to me, to be used effectively.
Any tips?

~~~
vec
Remap caps lock to be a ctrl key, then preferably remap your prefix key to a.
Caps+a is way easier to type.

~~~
marshray
Ctrl+L is good because it's on the home row and typically used for
uninteresting stuff anyway (like refreshing the terminal window).

My sequence to actually refresh the window is "Ctrl+L L"

------
rogerbinns
The single most irritating thing about tmux is that viewers have to look at
the same window or whatever it is called. My typical usage pattern is to
connect twice, have one window where there is a long running task I want to
monitor and a second where I am typing commands. But I can't show one in one
connection and the other in the other connection.

Note that I use byobu to front end things, and when using screen this can
easily be done. I have seen workarounds that involve using multiple copies of
tmux talking to each other in various heroic configurations but that is silly.

~~~
chirayuk
I believe tmux 1.8 supports this use case.

From the manpage (for new-session): If -t is given, the new session is grouped
with target-session. This means they share the same set of windows - all
windows from target-session are linked to the new session and any subsequent
new windows or windows being closed are applied to both sessions. The current
and previous window and any session options remain independent and either
session may be killed without affecting the other.

~~~
Sodel
I've started running tmux in all my terminals automatically, and conveniently
sharing a "master" session between them all.

Instead of running tmux directly, I have a small script which creates a
session named TMUX-MASTER if it doesn't already exist, and immediately
detaches it. All the clients that I actually interact with are created
separately and automatically grouped with the TMUX-MASTER session.

To prevent my system from being clogged by dozens of detached client sessions,
I rebound prefix+d to kill-session, killing the client session but leaving my
TMUX-MASTER session untouched. Closing terminals while running these client
sessions, however, still leaves my system cluttered with dormant client
sessions.

I'd like to see if a "ephemeral" option (it'd need a better name) could easily
be added to new-session, which would cause the created session to just die
when it's told to detach, or receives the HUP signal. It'd simplify things a
bit.

------
d0m
I started using tmux.. then switched to stumpwm which is too awesome to
explain here. Embrace the full power of emacs and your Window Manager.

~~~
eridius
stumpwm is a window manager. tmux is a terminal multiplexer. They are not the
same thing and using one does not preclude using the other.

~~~
d0m
*Started using tmux, then realized for my needs stumpwm was better. Obviously these are two different beasts. I still often use tmux on remote server for instance. However, if you use tmux locally, then a tiling manager might be better.

~~~
pimeys
Exactly. I've been using xmonad for years now and I've tried to start using
tmux for several occasions. I've never found any advantage of it compared to
my different xmonad layouts: tabbed, tall, tall mirrored and grid.

------
LiveTheDream
Is there a way (short of writing a script) that will allow me to shuffle
windows left and right, and/or move a window and slide the rest down?

Imagine having windows A, B, C, and D respectively in positions 0, 1, 2, and
3. I'd like to move D into position 1 so they end up in this order: A, D, B,
C.

Haven't figured out how to pull this off yet.

~~~
lucastx
I do it like this:

    
    
        bind-key ) swap-window -t +
        bind-key ( swap-window -t -
    

So "<prefix> (" swaps the active window with the one on its left, and
"<prefix> )" swaps it with the one on its right.

It seems to be what you want.

~~~
LiveTheDream
That works beautifully! Thank you.

------
base698
To get copy/paste to play nice in OSX you have to go through some Herculean
tasks. I made it work with netcat yesterday. I was running an http server to
do it :)

<https://github.com/base698/tmux-copy-paste-mac-osx>

~~~
rhapsodyv
I gave up of tmux. Now I just use iterm2 split pane. It's working fine for me.

~~~
bryogenic
You may not realize it but iterm2 is using tmux for its split panes. :)

