mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-03 03:38:52 +00:00
62 lines
2.8 KiB
Bash
62 lines
2.8 KiB
Bash
# Common tmux.conf file for NNTmux
|
|
|
|
# By default NNTmux uses C-a as the control prefix
|
|
set-option -g prefix C-a
|
|
bind-key C-a last-window
|
|
|
|
# Set copy mode to use VI keys - Activates PgUp/PgDn buttons
|
|
setw -g mode-keys vi
|
|
|
|
# Allows for faster key repetition
|
|
set -s escape-time 0
|
|
|
|
#set 256 color display
|
|
#set -g default-terminal "screen-256color"
|
|
set -g default-terminal "xterm-256color"
|
|
|
|
# Set status bar
|
|
set -g status-bg black
|
|
set -g status-fg white
|
|
set -g status-left ""
|
|
set -g status-right "#[fg=green]#H"
|
|
|
|
# Rather than constraining window size to the maximum size of any client
|
|
# connected to the *session*, constrain window size to the maximum size of any
|
|
# client connected to *that window*. Much more reasonable.
|
|
setw -g aggressive-resize on
|
|
|
|
## Allows us to use C-a a <command> to send commands to a TMUX session inside
|
|
## another TMUX session
|
|
# bind-key a send-prefix # <<<<===DELETE?
|
|
|
|
# Activity monitoring
|
|
setw -g monitor-activity on
|
|
#set -g visual-activity on
|
|
|
|
# # Refresh the status bar every 5 seconds.
|
|
set -g status-interval 5 # default = 15 seconds
|
|
|
|
# Several examples of using a shell command in the status line <<<=== DELETE???
|
|
#set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
|
|
#set -g status-right "#[fg=yellow]#(free -m | grep 'Mem' | awk '{ print \"Ram Used: \"$3\" MB\";}') #[fg=yellow]#(free -m | grep 'Mem' | awk '{ print \"Ram Free: \"$4\" MB\";}') \
|
|
#[fg=yellow]#(free -m | grep 'Swap' | awk '{ print \"Swap Used: \"$3\" MB\";}') #[fg=yellow]#(uptime | cut -d ',' -f 2-)"
|
|
#set -g status-right "#[fg=yellow]#(free -m | grep '+' | awk '{ print \"Ram Used: \"$3\" MB, Ram Free: \"$4\" MB\";}')#(free -m | grep 'Swap' | awk '{ print \",Swap Used: \"$3\" MB\";}') #[fg=cyan,bold]%Y-%m-%d #(uptime)"
|
|
# Compact status line for free version 3.3.10
|
|
set -g status-right "#[fg=yellow]#(free -h | grep 'Mem' | awk '{ print \"RAM Used: \"$3\", Cached: \"$6\", \";}')#(free -m | grep 'Swap' | awk '{ print \"Swapped: \"$3;}')M #[fg=cyan,bold] #(uptime | cut -d ',' -f 4-)"
|
|
|
|
set-option -g status-right-length 200
|
|
#set -g status-right '#[fg=green][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default] #($HOME/bin/battery)#[fg=green]]'
|
|
|
|
# Highlight active window
|
|
set-window-option -g window-status-current-bg red
|
|
|
|
# Scrollback line buffer per pane
|
|
set -g history-limit 3000 # reduce for memory limited systems (say <=8Gb)
|
|
|
|
# Keep pane open after process ends - monitor.php requires this for re-spawns (the only config param nZEDB really needs)
|
|
set -g set-remain-on-exit on
|
|
|
|
# Thanks to http://stackoverflow.com/questions/34187900/tmux-enabling-mouse-support-across-different-versions
|
|
# Note: must be last line for tmux <=1.8
|
|
if-shell "tmux -V |awk ' {split($2, ver, \".\"); if (ver[1] < 2) exit 1 ; else if (ver[1] == 2 && ver[2] < 1) exit 1 }' " 'source tmux_ge_2.3.conf' 'source tmux_le_2.0.conf'
|