two line tmux status bar
This commit is contained in:
parent
0e2d47cf63
commit
588cf15d68
61
.tmux.conf
61
.tmux.conf
@ -1,11 +1,32 @@
|
|||||||
#Switch to screen prefix
|
# Switch to screen prefix
|
||||||
|
# Ctrl-a
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
bind-key b send-prefix
|
bind-key b send-prefix
|
||||||
|
|
||||||
|
|
||||||
|
set -g base-index 1 # start windows numbering at 1
|
||||||
|
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||||
|
|
||||||
|
setw -g automatic-rename on # rename window to reflect current program
|
||||||
|
set -g renumber-windows on # renumber windows when a window is closed
|
||||||
|
|
||||||
|
set -g set-titles on # set terminal title
|
||||||
|
|
||||||
|
|
||||||
|
## Commonly found settings not 100% sure on the point
|
||||||
|
setw -g monitor-activity on
|
||||||
|
set -g visual-activity on
|
||||||
|
|
||||||
#Double cntl-a goes to last window
|
#Double cntl-a goes to last window
|
||||||
bind-key C-a last-window
|
bind-key C-a last-window
|
||||||
|
|
||||||
|
# Turn on mouse support
|
||||||
|
set-option -g mouse on
|
||||||
|
|
||||||
|
bind-key -n C-S-Left swap-pane -t :-
|
||||||
|
bind-key -n C-S-Right swap-pane -t :+
|
||||||
|
|
||||||
#Cntl-a Backspace goes to previous window
|
#Cntl-a Backspace goes to previous window
|
||||||
unbind BSpace
|
unbind BSpace
|
||||||
bind BSpace previous-window
|
bind BSpace previous-window
|
||||||
@ -15,30 +36,37 @@ bind % split-window -c "#{pane_current_path}" -h
|
|||||||
bind '"' split-window -c "#{pane_current_path}" -v
|
bind '"' split-window -c "#{pane_current_path}" -v
|
||||||
bind c new-window -c "#{pane_current_path}"
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
|
||||||
#kill window/server with confirm
|
#kill window/server with confirm
|
||||||
bind-key k confirm kill-window
|
bind-key k confirm kill-window
|
||||||
bind-key K confirm kill-server
|
bind-key K confirm kill-server
|
||||||
|
|
||||||
#Status bar
|
|
||||||
set -g status-bg cyan
|
|
||||||
set-option -g status-justify centre
|
|
||||||
|
|
||||||
#Left
|
# Status bar
|
||||||
set -g status-left-length 30
|
# Enable two lines for the status bar
|
||||||
set -g status-left '#[fg=blue]%H:%M %d-%b-%y'
|
set-option -g status 2
|
||||||
|
set-option -g status-position bottom
|
||||||
|
|
||||||
|
# First line: Center (Window List)
|
||||||
|
set-option -g status-format[0] '#[align=centre]#{W:#{E:window-status-format} ,#{E:window-status-current-format} }'
|
||||||
|
|
||||||
set -g status-right '#[fg=blue]#h #[fg=yellow]#(acpi -i)'
|
# Second line: Center (Time/Date, ACPI, CPU/Mem, Hostname)
|
||||||
|
set-option -g status-format[1] "#[align=centre][#[fg=cyan]%H:%M %d-%b-%y] [#[fg=yellow]#(acpi -b | awk -F', ' '{print $2, $3}')] [#[fg=green,bg=default,bright]#(tmux-mem-cpu-load)] [#[fg=blue]#h]"
|
||||||
|
|
||||||
#change numbering to start from 1
|
# Ensure window list is properly justified
|
||||||
set -g base-index 1
|
set-option -g status-justify centre # Changed to centre
|
||||||
|
|
||||||
|
# Background color for status bar (Blue)
|
||||||
|
set -g status-bg colour24
|
||||||
|
set -g status-fg colour231
|
||||||
|
|
||||||
|
# Window list formatting
|
||||||
|
set-window-option -g window-status-format '#[fg=colour117,bg=colour24] #I:#W #[fg=colour24,bg=colour24]'
|
||||||
|
set-window-option -g window-status-current-format '#[fg=colour16,bg=colour231] #I:#W #[fg=colour24,bg=colour24]'
|
||||||
|
|
||||||
# Bind function keys to windows
|
# Bind function keys to windows
|
||||||
bind -n F1 select-window -t 1
|
bind -n F1 select-window -t 1
|
||||||
bind -n F2 select-window -t 2
|
bind -n F2 select-window -t 2
|
||||||
bind -n F3 select-window -t 3
|
bind -n F3 select-window -t 3
|
||||||
bind -n F4 select-window -t 4
|
bind -n F4 select-window -t 4
|
||||||
bind -n F5 select-window -t 5
|
bind -n F5 select-window -t 5
|
||||||
bind -n F6 select-window -t 6
|
bind -n F6 select-window -t 6
|
||||||
@ -50,12 +78,13 @@ bind -n F10 select-window -t 10
|
|||||||
#start programs
|
#start programs
|
||||||
new -s mysession -n "sys-mon" glances
|
new -s mysession -n "sys-mon" glances
|
||||||
neww -n "Log" "journalctl -f"
|
neww -n "Log" "journalctl -f"
|
||||||
neww
|
neww
|
||||||
#neww -n "Music" ncmpcpp
|
#neww -n "Music" ncmpcpp
|
||||||
#neww -n "Deluge" deluge-console
|
#neww -n "Deluge" deluge-console
|
||||||
|
|
||||||
#reload tmux config
|
#reload tmux config
|
||||||
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
||||||
|
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
||||||
|
|
||||||
#vi keybindings
|
#vi keybindings
|
||||||
set -g mode-keys vi
|
set -g mode-keys vi
|
||||||
@ -77,8 +106,4 @@ bind F12 send-keys F12
|
|||||||
# renumber windows after closing one
|
# renumber windows after closing one
|
||||||
set -g renumber-windows on
|
set -g renumber-windows on
|
||||||
|
|
||||||
|
set -g history-limit 50000
|
||||||
#In order to use this file you can either
|
|
||||||
#####1. Put it in your home folder named .tmux.conf
|
|
||||||
##2. Add an alias in your bashrc (or the equivilent file for your shell) for tmux doing tmux -f /location/of/this/file
|
|
||||||
##3. Put this file in /etc/ named tmux.conf
|
|
Loading…
Reference in New Issue
Block a user