tmux.conf

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

tmux.conf

Unread post by machinebacon » Sat Oct 19, 2013 4:03 am

Please drop your tmux.conf files here (if you like, attach the file to the post so you have it backed up)

Scrot, or it never happened ;)

Thanks for sharing:)
..gnutella..

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: tmux.conf

Unread post by ivanovnegro » Sat Oct 19, 2013 4:16 am

And what about screen?. :) Yeah, I am old school.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tmux.conf

Unread post by machinebacon » Sat Oct 19, 2013 4:51 am

Screenrc? Are you fucking me? :D How old-school can somebody be? Still using ex and ed for editing? Steam-powered CPU in the backyard? :D

Yeah, okay, post it... but please mention that it is a screenrc :D
..gnutella..

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: tmux.conf

Unread post by ivanovnegro » Sat Oct 19, 2013 6:18 am

machinebacon wrote: ...but please mention that it is a screenrc :D
Of course.

Ivan's damn cryptic screenrc:

Code: Select all

#Turn off Start Message
startup_message off

#Automatically Detach Session
autodetach on

#Use utf8
defutf8 on

#Status Bar and Info Bar

caption always "%{-b gk}%-w%{+b kg}%50>%n %t%{-b gk}%+w%< %= %{y}%1` %{w}%D %M %d %{w}%c" 
hardstatus on

## set the default shell
shell bash

# screens
screen -t 'bash'
screen -t 'htop' htop
screen -t 'podcast' podbeuter
screen -t 'music' ncmpcpp

terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

vbell off

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: tmux.conf

Unread post by DebianJoe » Sat Oct 19, 2013 6:22 am

Ivan, I can fix that for you:

Code: Select all

sudo apt-get remove screen
sudo apt-get install tmux
;)

I believe that my tmux.conf is in a few releases, but in case someone wishes to borrow any of it:

Code: Select all

# Set the prefix to ^A.
unbind C-b 
set -g prefix ^A
bind a send-prefix 
 
# panes
set -g mouse-select-pane on 
set -g pane-border-fg black
set -g pane-active-border-fg cyan
# resize panes with mouse (drag borders)
set -g mouse-select-pane on   
set -g mouse-resize-pane on

# screen ^C c 
unbind ^C
bind ^C new-window
unbind c  
bind c new-window

# detach ^D d 
unbind ^D 
bind ^D detach 
 
# displays * 
unbind *  
bind * list-clients   
 
# next ^@ ^N sp n 
unbind ^@    
bind ^@ next-window 
unbind ^N   
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window

# title A
unbind A 
bind A command-prompt "rename-window %%"

# other ^A
unbind ^A
bind ^A last-window

# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

Eren
apt-getter
Posts: 75
Joined: Thu Nov 22, 2012 1:47 pm

Re: tmux.conf

Unread post by Eren » Sat Oct 26, 2013 1:37 pm

Code: Select all

set -g history-limit 10000
set -g status-utf8 on
set -g status-bg default
set -g status-fg black
set -g status-left-length 100
set -g status-left " #[fg=red]tmux#[fg=yellow] #W#[fg=red] >> #[fg=green]#(cat /proc/loadavg | cut -c 1-14) #[fg=red]>> #[fg=green]%d/%m %H:%M  "
set -g status-right-length 0
set -g status-right ""
set -g status-justify right
setw -g window-status-format '#[fg=white]#I#[fg=yellow] #W'
setw -g window-status-current-format '#[fg=green]#I#[fg=red] #W'
set-window-option -g window-status-current-fg red
I killed a man 'cause he killed my goat
I put my hands around his throat
He tried to reason with the sky and the clouds
But it didn't matter, 'cause they can't hear a sound

User avatar
gutterslob
Resident Tranny
Posts: 1124
Joined: Thu Aug 08, 2013 7:13 pm

Re: tmux.conf

Unread post by gutterslob » Mon Oct 28, 2013 3:12 pm

I already posted this in the old/defunct noob forum. No idea if bacon included it in any of the BBQ versions.

Image

~/.tmux.conf

Code: Select all

# change prefix to Ctrl-a (like in gnu-screen)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix


# shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh


# start with window 1 (instead of 0)
set -g base-index 1


# start with pane 1
set -g pane-base-index 1


# screen mode
set -g default-terminal "screen-256color"


# source config file
bind r source-file ~/.tmux.conf
bind R source-file ~/.tmux-no-x.conf

# open man page in new window
bind  / command-prompt "split window 'exec man %%'"

# history
set -g history-limit 5000


# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'

# to make ctrl + arrows, etc work
set-window-option -g xterm-keys on

# copy mode
#unbind [
#bind Escape copy-mode
#unbind ]
bind ] paste-buffer


# use vi mode
setw -g mode-keys vi
set -g status-keys vi
setw -g utf8 on
# use mouse in copy mode
setw -g mode-mouse on


# tmux-zoom.sh - no longer required with new versions of tmux
# bind C-z run "tmux-zoom.sh"


# splitting
unbind %
bind h split-window -h
unbind '"'
bind v split-window -v


# window switching
unbind n
bind = next-window
#unbind p
bind - previous-window
bind -n C-Right next-window
bind -n C-Left previous-window
# with mouse (click on pretty little boxes)
set -g mouse-select-window on


# colon :
bind : command-prompt


# panes
set -g mouse-select-pane on
set -g pane-border-fg black
if '[ -z "$DISPLAY" ]' 'set -g pane-border-fg blue'
set -g pane-active-border-fg brightred
#set -g pane-active-border-attr blink
# resize panes with mouse (drag borders)
set -g mouse-select-pane on
set -g mouse-resize-pane on

# status on top
#set -g status-position top

# status line
set -g status-utf8 on
set -g status-justify left
set -g status-bg black
if '[ -z "$DISPLAY" ]' 'set -g status-bg default'
set -g status-fg white
set -g status-interval 4

# messaging
set -g message-fg black
set -g message-bg yellow
set -g message-command-fg blue
set -g message-command-bg black


#window mode
setw -g mode-bg colour6
setw -g mode-fg colour0


# window status
if '[ -z "$DISPLAY" ]' 'setw -g window-status-format " #F#I:#W "'
if '[ -z "$DISPLAY" ]' 'setw -g window-status-current-format " #F#I:#W "'
setw -g window-status-format "#[fg=colour8]#[bg=white] #I #[bg=colour8]#[fg=white] #W "
setw -g window-status-current-format "#[fg=black]#[bg=colour7] #I #[fg=black]#[bg=colour15] #W "
setw -g window-status-current-bg black
setw -g window-status-current-fg yellow
setw -g window-status-current-attr bold
setw -g window-status-bg black
setw -g window-status-fg blue
setw -g window-status-attr default
setw -g window-status-content-bg black
setw -g window-status-content-fg blue
setw -g window-status-content-attr bold


# Info on right
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour8]// #[fg=cyan]Tmux [#S]'
if '[ -z "$DISPLAY" ]' 'set -g status-right "#[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1-3) #[fg=white]| #[fg=yellow]Tmux:#S #[fg=white]| #[fg=green]%d-%m-%Y #[fg=white]| #[fg=cyan]%A %H:%M"'
set -g status-right-length 35
if '[ -z "$DISPLAY" ]' 'set -g status-right-length 60'

# Info on left (no session display)
set -g status-left ''


# loud or quiet?
set-option -g visual-activity on
set-option -g visual-bell off
set-option -g visual-content off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-window-option -g monitor-content on
set-option -g bell-action none
#set-option -g bell-on-alert on

# tmux clock
set -g clock-mode-colour blue

# some key-binding changes
bind x kill-pane
bind X next-layout
bind Z previous-layout
#unbind Left
#bind C-Left resize-pane -L 2
#bind h select-pane -L
#unbind Down
#bind C-Down resize-pane -D 2
#bind j select-pane -D
#unbind Up
#bind C-Up resize-pane -U 2
#bind k select-pane -U
#unbind Right
#bind C-Right resize-pane -R 2
#bind l select-pane -R
#unbind C-Left
#bind C-h resize-pane -L 1
#unbind C-Down
#bind C-j resize-pane -D 1
#unbind C-Up
#bind C-k resize-pane -U 1
#unbind C-Right
#bind C-l resize-pane -R 1
#unbind M-Left
#bind C-H resize-pane -L 30
#unbind M-Down
#bind C-J resize-pane -D 30
#unbind M-Up
#bind C-K resize-pane -U 30
#unbind M-Right
#bind C-L resize-pane -R 30
~/.tmux-no-x.conf

Code: Select all

# change prefix to Ctrl-a (like in gnu-screen)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix


# shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh


# start with window 1 (instead of 0)
set -g base-index 1


# start with pane 1
set -g pane-base-index 1


# screen mode
set -g default-terminal "screen-256color"


# source config file
bind r source-file ~/.tmux.conf
bind R source-file ~/.tmux-no-x.conf

# open man page in new window
bind  / command-prompt "split window 'exec man %%'"

# history
set -g history-limit 5000


# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'

# to make ctrl + arrows, etc work
set-window-option -g xterm-keys on

# copy mode
#unbind [
#bind Escape copy-mode
#unbind ]
bind ] paste-buffer


# use vi mode
setw -g mode-keys vi
set -g status-keys vi
setw -g utf8 on
# use mouse in copy mode
setw -g mode-mouse on


# tmux-zoom.sh - no longer required with new versions of tmux
# bind C-z run "tmux-zoom.sh"


# splitting
unbind %
bind h split-window -h
unbind '"'
bind v split-window -v


# window switching
unbind n
bind = next-window
#unbind p
bind - previous-window
bind -n C-Right next-window
bind -n C-Left previous-window
# with mouse (click on pretty little boxes)
set -g mouse-select-window on


# colon :
bind : command-prompt


# panes
set -g mouse-select-pane on
set -g pane-border-fg black
if '[ -z "$DISPLAY" ]' 'set -g pane-border-fg blue'
set -g pane-active-border-fg brightred
#set -g pane-active-border-attr blink
# resize panes with mouse (drag borders)
set -g mouse-select-pane on
set -g mouse-resize-pane on

# status on top
#set -g status-position top

# status line
set -g status-utf8 on
set -g status-justify left
set -g status-bg black
if '[ -z "$DISPLAY" ]' 'set -g status-bg default'
set -g status-fg white
set -g status-interval 4

# messaging
set -g message-fg black
set -g message-bg yellow
set -g message-command-fg blue
set -g message-command-bg black


#window mode
setw -g mode-bg colour6
setw -g mode-fg colour0


# window status
setw -g window-status-format " #F#I:#W "
setw -g window-status-current-format " #F#I:#W "
#setw -g window-status-format "#[fg=colour8]#[bg=white] #I #[bg=colour8]#[fg=white] #W "
#setw -g window-status-current-format "#[fg=black]#[bg=colour7] #I #[fg=black]#[bg=colour15] #W "
setw -g window-status-current-bg black
setw -g window-status-current-fg yellow
setw -g window-status-current-attr bold
setw -g window-status-bg black
setw -g window-status-fg blue
setw -g window-status-attr default
setw -g window-status-content-bg black
setw -g window-status-content-fg blue
setw -g window-status-content-attr bold


# Info on right
#set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour8]// #[fg=cyan]Tmux [#S]'
set -g status-right "#[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1-3) #[fg=white]| #[fg=yellow]Tmux:#S #[fg=white]| #[fg=green]%d-%m-%Y #[fg=white]| #[fg=cyan]%A %H:%M"
#set -g status-right-length 35
set -g status-right-length 60

# Info on left (no session display)
set -g status-left ''


# loud or quiet?
set-option -g visual-activity on
set-option -g visual-bell off
set-option -g visual-content off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-window-option -g monitor-content on
set-option -g bell-action none
#set-option -g bell-on-alert on

# tmux clock
set -g clock-mode-colour blue

# some key-binding changes
bind x kill-pane
bind X next-layout
bind Z previous-layout
Why 2 configs?
The fancy tab-like things in the first one aren't rendered properly in a X-less TTY. The config works fine if you're starting a new session, thanks to the if '[ -z "$DISPLAY" ]' variable, but if you want to launch a nested session after a crash, or just go in and out of X for whatever reason, that's where the dual configs come in handy.

TL;DR
Prefix + r = Tmux In X, or fresh Tmux session anywhere
Prefix + R = If X crashes and you want to re-attach a nested session with a traditional statusbar.

There probably is a more elegant way to get this with a single config - possibly with the set/show/update-environment options - but I haven't had time to delve into those yet.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: tmux.conf

Unread post by GekkoP » Mon Oct 28, 2013 3:19 pm

^ your "window status" and "info on the right" are the ones I use on every PC I have. Really lovely.

User avatar
gutterslob
Resident Tranny
Posts: 1124
Joined: Thu Aug 08, 2013 7:13 pm

Re: tmux.conf

Unread post by gutterslob » Mon Oct 28, 2013 3:23 pm

^ Cheers, Gekko

Might as well post my old screenrc, for the gnufags =P

Image

~/.screenrc

Code: Select all

# switch order of caption and hardstatus:
  hardstatus alwayslastline
  hardstatus string '%{= m}Load Avg:%{= G} %l %= %{= w}%-w%{+b r}%n:%t%{-b r}%{w}%+w %= %{b}%D %d/%m/%Y %{Y}%c'

# add CPU idle/sustem/user/interrupt stats
backtick 100 5 5 tail -1 /var/tmp/geezer_stats_top
caption always '%{= wk} %200` %= %100` %='


# detach on hangup
  autodetach            on            
  crlf                  off             
  deflogin              off             
# defsilence            off             
# hardcopy_append       on              
  hardcopy_append       off             
  nethack               on              
# don't display the copyright page
  startup_message       off             # default: on
# no annoying audible bell, please
  vbell                 on

  defscrollback         1000            # default: 100
# msgminwait            3               # default: 1
  silencewait           15              # default: 30

  hardcopydir           $HOME/.hardcopy

  shell                 /bin/zsh

# "sorendition": set the colors for
# the "messages" and "text marking"
# (ie text you mark in copy mode):
  sorendition 10 99 # default!

# use %n to display the window number and %t for its title:
  activity              "activity in %n (%t) [%w:%s]~"

# pass on the "beep" (CTRL-G) by adding a '~':
  bell                  "bell     in %n (%t) [%w:%s]~"

# pow_detach_msg:       Message shown when session
#                       gets power detached.
  pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# vbell_msg:            Message shown when the
#                       "virtual bell" rings.
  vbell_msg             " *beep* "

# Key bindings
# Remove some default key bindings by binding them to "nothing" (empty right-hand-side):
# bind .  dumptermcap # default
  bind .
  bind ^\
  bind \\

# 040126 To be able to select windows with n > 9 ->
# Press "C-a - #" instead of just "C-a #"
  bind - command -c select_1n
  bind -c select_1n 0 select 10
  bind -c select_1n 1 select 11
  bind -c select_1n 2 select 12
  bind -c select_1n 3 select 13
  bind -c select_1n 4 select 14
  bind -c select_1n 5 select 15
  bind -c select_1n 6 select 16
  bind -c select_1n 7 select 17
  bind -c select_1n 8 select 18
  bind -c select_1n 9 select 19
  bind -c select_1n - command -c select_2n
  bind -c select_2n 0 select 20
  bind -c select_2n 1 select 21
  bind -c select_2n 2 select 22
  bind -c select_2n 3 select 23
  bind -c select_2n 4 select 24
  bind -c select_2n 5 select 25
  bind -c select_2n 6 select 26
  bind -c select_2n 7 select 27
  bind -c select_2n 8 select 28
  bind -c select_2n 9 select 29
  bind -c select_2n - select -

# Cycle backwards/forwards in the list of existing windows:
  bindkey "^[Od" prev
  bindkey "^[Oc" next

# remove some stupid / dangerous key bindings
  bind k
  bind ^k
  bind .
  bind ^\
  bind \\
  bind ^h
  bind h  hardcopy
# make them better
  bind 'K' kill
  bind 'I' login on
  bind 'O' login off
  bind '}' history

  bind G screen -t 'google'    w3m www.google.com

# Paste - use 'P' instead of ']':
# bind P # unbound by default
  bind P paste .

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
#  register [ "\033:se noai\015a"
#  register ] "\033:se ai\015a"
#  bind ^] paste [.]

#      X - a fast way to lock the current screen.
  bind X lockscreen

# 030511 Workaround for stupid machines without xmodmap ;-)
  bindkey -t °a stuff "ä"
  bindkey -t °A stuff "Ä"
  bindkey -t °o stuff "ö"
  bindkey -t °O stuff "Ö"
  bindkey -t °u stuff "ü"
  bindkey -t °U stuff "Ü"
  bindkey -t °s stuff "ß"

  msgwait 1
  version
# change back to showing messages
# for duration of two seconds:
  msgwait 2

# To get screen to add lines to xterm's scrollback buffer, uncomment the
# following termcapinfo line which tells xterm to use the normal screen buffer
# (which has scrollback), not the alternate screen buffer.
  termcapinfo xterm|xterms|xs|rxvt ti@:te@

# Welcome:
  echo "Point & Squirt"
uniload.sh (should be running before launching screen)

Code: Select all

#! /bin/sh

STATS_FILE=/var/tmp/${USER}_stats_top
DELAY=1

# Most BSDs use jot(1) while Linux uses seq(1)
which jot 1> /dev/null 2> /dev/null || alias jot=seq

__freebsd() {
  top -s ${DELAY} -d 2 0  \
    | grep -m 1 CPU \
    | sed 's/,//g' \
    | awk '{ print $4": "$3" | "$6": "$5" | "$8": "$7" | "$10": "$9" | "$12": "$11 }'
  }

__linux() {
  top -d ${DELAY} -n 2 -b \
    | grep -m 2 Cpu \
    | tail -1 \
    | sed 's/%/ /g' \
    | awk '{ print "User: " $2 " | System: " $4 " | Nice: " $6 " | Idle: " $8 }'
  }

__exit() {
  rm -rf ${STATS_FILE}
  exit 0
  }

trap '__exit' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
OS=$( uname )
while true
do
  for I in $( jot 128 ); do
    case ${OS} in
      (FreeBSD) __freebsd >> ${STATS_FILE} 2>&1 ;;
      (Linux)   __linux   >> ${STATS_FILE} 2>&1 ;;
      (*)       echo "supported systems: FreeBSD Linux"; exit 1 ;;
    esac
  done
  sleep 1
  :> ${STATS_FILE}
done

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: tmux.conf

Unread post by ivanovnegro » Mon Oct 28, 2013 6:30 pm

^ Fantastic. Thank you Slob.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tmux.conf

Unread post by machinebacon » Mon Oct 28, 2013 7:23 pm

sogar mit umlauten! slob ist also doch ne kartoffel :)
..gnutella..

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: tmux.conf

Unread post by bones » Sat Nov 16, 2013 4:41 pm

Just finished tweaking my slack tmux.conf:

Code: Select all

# remap prefix to Control + a
unbind C-b
set -g prefix C-a
#bind C-a send-prefix
bind-key a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# colors
set -g default-terminal "screen-256color"

# start window numbering at 1 for easier switching
set -g base-index 1

# unicode
setw -g utf8 on
set -g status-utf8 on

# status bar settings
set -g status-bg black
set -g status-fg green
set -g status-left '#h:[#S]'
set -g status-left-length 50
set -g status-right-length 50
set -g status-right "⚡ #(~/bin/battery Discharging; ~/bin/battery Charging) [✉ #(~/bin/imap_check.py)] %H:%M %d-%h-%Y"
setw -g window-status-current-format "|#I:#W|"
setw -g window-status-current-fg colour166
setw -g window-status-current-bg black
set-window-option -g automatic-rename off

# border coloring for panes
set-option -g pane-active-border-fg colour166

# listen to alerts from all windows
set -g bell-action any
setw -g window-status-bell-bg white
setw -g window-status-bell-fg red

# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+

# screen like window toggling
bind Tab last-window
bind Escape copy-mode

# rebind pane tiling
bind V split-window -h
bind H split-window

# bind fast session switching
unbind S
bind S command-prompt "switch -t %1"

# mouse related config
set -g mouse-select-pane off
set -g mode-mouse off

# vim movement bindings
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# bind resize commands to keys
bind = resize-pane -D 5
bind + resize-pane -U 5
bind < resize-pane -L 5
bind > resize-pane -R 5


### COLOR (Solarized light)

# default statusbar colors
set-option -g status-bg white #base2
set-option -g status-fg yellow #yellow
set-option -g status-attr default

# default window title colors
set-window-option -g window-status-fg brightyellow #base00
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim

# active window title colors
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright

# pane border
set-option -g pane-border-fg white #base2
set-option -g pane-active-border-fg brightcyan #base1

# message text
set-option -g message-bg white #base2
set-option -g message-fg brightred #orange

# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange

# clock
set-window-option -g clock-mode-colour green #green

User avatar
kexolino
Common Boob
Posts: 557
Joined: Sun Jun 16, 2013 1:57 pm

Re: tmux.conf

Unread post by kexolino » Sat May 31, 2014 6:45 am

I started using tmux again yesterday, and I've been noticing a slight delay in vim when switching modes, saving, etc. A quick search revealed the fix:

Code: Select all

set -sg escape-time 0

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: tmux.conf

Unread post by dkeg » Sat May 31, 2014 1:25 pm

Great find. Thanks for posting the fix.

Work hard; Complain less

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: tmux.conf

Unread post by bones » Sat May 31, 2014 2:54 pm

+1, excellent, kex! Thanks!

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: tmux.conf

Unread post by wuxmedia » Thu Aug 14, 2014 11:06 pm

Code: Select all

#Joe's Tmux Config
#Destory and remuxed by WuX 2014-06-25

# reload config without killing server
bind R source-file ~/.tmux.conf \; display-message "  Config reloaded..".

# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix

# panes
set -g pane-border-fg black
set -g pane-active-border-fg red
# resize panes with mouse (drag borders)
set -g mouse-select-pane on
set -g mouse-resize-pane on

#TERM
set -g default-terminal "screen"

# screen ^C c 
unbind ^C
bind ^C new-window
unbind c
bind c new-window

# detach ^D d
unbind ^D
bind ^D detach

# displays * 
unbind *
bind * list-clients

# next ^@ ^N sp n 
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind left
bind n next-window

#window switch?
bind -n C-left prev
bind -n C-right next

# title A
unbind A
bind A command-prompt "rename-window %%"

# set vi keys
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

# other ^A
unbind ^A
bind ^A last-window

# prev ^H ^P p ^? 
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window

# windows ^W w 
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows

# quit \ 
unbind '\'
bind '\' confirm-before "kill-server"

# kill K k 
unbind K
bind K confirm-before "kill-window"
#unbind k
#bind k confirm-before "kill-window"

# redisplay ^L l 
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client

# split 
bind v split-window -h
bind h split-window -v


# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-

# " windowlist -b
unbind '"'
bind '"' choose-window

# scrollback buffer n lines
set -g history-limit 5000

# listen for activity on all windows
set -g bell-action any

# enable wm window titles
#set -g set-titles on

# enable auto renaming
setw -g automatic-rename on

# default statusbar colors
set -g status-fg white
set -g status-bg default

setw -g window-status-format "#[fg=white]#[bg=black] #I #[bg=default]#[fg=brightblack] #W "
setw -g window-status-current-format "#[bg=brightred]#[fg=white] #I #[fg=red]#[bg=default] #W "
setw -g window-status-current-bg default
setw -g window-status-current-fg red
setw -g window-status-current-attr dim
setw -g window-status-content-attr bold

set-option -g status-utf8 on
set-option -g status-justify "centre"

set -g status-left ''
set -g status-right '#[fg=brightgreen]%a %H:%M'


# default window title colors
set-window-option -g window-status-fg black
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim

# active window title colors
set-window-option -g window-status-current-fg red
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright

# command/message line colors
set -g message-fg red
set -g message-bg default
set -g message-attr bright

set -g message-command-fg blue
set -g message-command-bg black

# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
bastard child of slob and debjoe, a few minor tweaks from me. probably a bit of a sparse status, but i already know what time/date it is and my host. rarely used out of X.
"Seek, and Ye shall find"
"Github | Chooons | Site"

twoion
Mr. Saggy Tits
Posts: 29
Joined: Sat Aug 09, 2014 6:19 pm

Re: tmux.conf

Unread post by twoion » Tue Aug 26, 2014 5:45 pm

Image

Code: Select all

bind s split-window -v
bind v split-window -h
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind < resize-pane -L 4
bind > resize-pane -R 4
bind - resize-pane -D 4
bind + resize-pane -U 4
bind enter last-window
bind : command-prompt
bind @ select-window -t mutt

set -g default-command 'bash'
set -g status-bg black
set -g status-fg yellow
set -g history-limit 16000
set -g set-titles on
set -g status-utf8 on
set -g default-terminal 'screen-256color'
set -g status-right ""
set -g status-left ""
set -g status-justify centre
set -g status-style "bg=default"
set -ag status-style "fg=colour3"
setw -g mode-keys vi
setw -g mode-style "bg=colour3"
setw -ag mode-style "fg=colour0"
setw -g window-status-format "#[fg=colour8]#[bg=colour7] #{window_index} #[bg=colour7]#[fg=colour8] #{window_name} "
setw -g window-status-current-format "#[bg=colour8]#[fg=colour7] #{window_index} #[fg=colour0]#[bg=colour3] #{window_name} "
setw -g window-status-current-attr dim
setw -g window-status-bg green
setw -g window-status-fg black
setw -g clock-mode-colour yellow
setw -g window-status-attr reverse
setw -g window-status-content-bg colour0
setw -g window-status-content-fg colour11
setw -g window-status-content-attr bold,blink,reverse
setw -ag pane-active-border-style "fg=yellow"
setw -ag pane-border-style "fg=brightblack"
Last edited by pidsley on Tue Aug 26, 2014 8:31 pm, edited 1 time in total.
Reason: fixed image link

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: tmux.conf

Unread post by wuxmedia » Tue Aug 26, 2014 8:07 pm

^ Image link is dead, you can upload scrots to the forum (although not a massive file)
I should add one to mine really...
"Seek, and Ye shall find"
"Github | Chooons | Site"

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: tmux.conf

Unread post by pidsley » Tue Aug 26, 2014 8:32 pm

wuxmedia wrote:^ Image link is dead, you can upload scrots to the forum (although not a massive file)
fixed

my .tmux.conf

Code: Select all

set-option -g prefix C-a

bind - split-window -v
bind | split-window -h
bind ^ resize-pane -U 5
bind v resize-pane -D 5
bind < resize-pane -L 5
bind > resize-pane -R 5

bind -n F12 split-window -v
bind -n F9 split-window -h
bind -n F10 split-window -h -p 33
bind -n F11 split-window -v -p 33

set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mode-keys vi
set-option -g repeat-time 50

set -g status-utf8 on
set -g status-fg white
set -g status-bg black

set -g status-left-length 28
set -g status-left "#[fg=white]@#h |"

set -g status-right-length 58
set -g status-right "#[fg=yellow]#(cat /proc/loadavg | cut -c 1-14)  %Y-%m-%d %I:%M %P "

set-window-option -g window-status-fg green
set-window-option -g window-status-bg black
set-window-option -g window-status-current-attr bold

set-window-option -g mode-mouse on
Image

User avatar
gutterslob
Resident Tranny
Posts: 1124
Joined: Thu Aug 08, 2013 7:13 pm

Re: tmux.conf

Unread post by gutterslob » Mon Sep 08, 2014 7:02 pm

Not exactly a .conf file, but still useful;
https://github.com/tmux-plugins

Post Reply