Files
newznab-tmux-NNTmux/misc/update/tmux/tmux.conf
T
2025-04-17 15:30:45 +02:00

94 lines
3.2 KiB
Bash

# Common tmux.conf file for NNTmux
# By default NNTmux uses C-a as the control prefix
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2
# 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
# 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
# Right status bar
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-)"
# Highlight active window
#set-window-option -g window-status-current-bg red
# Scrollback line buffer per pane
set -g history-limit 6000 # 6000 lines of scrollback history
# Keep pane open after process ends - monitor.php requires this for re-spawns (the only config param NNTmux really needs)
set -g remain-on-exit on
# Enable mouse support
set -g mouse on
# Rename pane
bind t command-prompt -p "(rename-pane)" -I "#T" "select-pane -T '%%'"
##################################################################################################
### DESIGN CHANGES source: https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/###
##################################################################################################
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# modes
setw -g clock-mode-colour colour5
setw -g mode-style "fg=colour1,bg=colour18,bold"
# panes
set -g pane-border-style "fg=colour19,bg=colour0"
set -g pane-active-border-style "fg=colour9,bg=colour0"
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style "fg=colour137,bg=colour18,dim"
set -g status-left ''
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 -g status-right-length 200
set -g status-left-length 10
setw -g window-status-current-style "fg=colour1,bg=colour19,bold"
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style "fg=colour9,bg=colour18"
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style "fg=colour255,bg=colour1,bold"
# messages
set -g message-style "fg=colour232,bg=colour16,bold"
# Add powerline to tmux
source '/usr/share/powerline/bindings/tmux/powerline.conf'