Live data from Hacker News

Using tmux properly

danielallendeutsch.com

1–10 of 218 posts

Re: Using tmux properly

#2
A big thing I've done is use my multiplexer segregate contexts. When I spin up screen (tmux would work the same, just never switched) I set an environment variable noting the particular context I'm working in, and I adjust my PATH, HISTFILE, and more based on this variable.

Re: Using tmux properly

#3
There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console, without messing everything up. Is that possible?

Re: Using tmux properly

#4

A big thing I've done is use my multiplexer segregate contexts. When I spin up screen (tmux would work the same, just never switched) I set an environment variable noting the particular context I'm working in, and I adjust my PATH, HISTFILE, and more based on this variable.

I create new sessions and name them appropriately. My one wish is to be able to do "PREFIX ls" and then just hit enter on the session to switch to. I may be missing something, but I always have to do "PREFIX a -t [session name]".

Re: Using tmux properly

#5
I basically use tmux as my window manager. I only typically open two programs: a browser, and a terminal. Both are always in full-screen mode.

It makes things nice and simple. No matter if I'm working on a laptop or a desktop, all my terminal windows end up in the same place and have the same settings. It's great!

Re: Using tmux properly

#6
post #3

There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console, without messing everything up. Is that possible?

Byobu does this in my case with default settings, just with alt+pg-up/down

Re: Using tmux properly

#7
post #3

There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console, without messing everything up. Is that possible?

Kind of. I use

    bind-key -t vi-copy "J" page-down
    bind-key -t vi-copy "K" page-up
Then I can just enter tmux's vi mode, and scroll up and down with shift-J/K. I don't know of a way to bind shift-PgUp/PgDn though, which sounds like what you are looking for.

Re: Using tmux properly

#8
post #3

There is one thing I want from my terminal multiplexer: working scroll functionality with Shift+PgUp/PgDn, even in split screens, just like in a plain console, without messing everything up. Is that possible?

You do one better - tmux's mouse mode allows you to scroll with your mouse wheel.

Just add 'set -g mouse on' to your ~/.tmux.conf. You can configure the history size limit by setting 'set-option -g history-limit '. When you scroll the mouse wheel, tmux will enter copy mode and scroll.

Re: Using tmux properly

#10

I basically use tmux as my window manager. I only typically open two programs: a browser, and a terminal. Both are always in full-screen mode. It makes things nice and simple. No matter if I'm working on a laptop or a desktop, all my terminal windows end up in the same place and have the same settings. It's great!

You and I have almost exactly the same setup. I also usually only have a browser and terminal/tmux running.

If I'm reading the general web then I max the browser (which also maxes the terminal, since I'm running awesome-wm tiling window manager).

If I'm writing code or anything else terminal-focused, then they're unmaxed, side by side.

Post reply on HN