# Switch to screen prefix # Ctrl-a unbind C-b set -g prefix C-a bind-key b send-prefix set -g base-index 1 # start windows numbering at 1 set-window-option -g pane-base-index 1 # make pane numbering consistent with windows set-window-option -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 set-window-option -g monitor-activity on set-option -g visual-activity on #Double cntl-a goes to 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 unbind BSpace bind BSpace previous-window #Splitting to current $PWD bind % split-window -c "#{pane_current_path}" -h bind '"' split-window -c "#{pane_current_path}" -v bind c new-window -c "#{pane_current_path}" #kill window/server with confirm bind-key k confirm kill-window bind-key K confirm kill-server # Status bar # Enable two lines for the status bar 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} }' # Second line: Center (Time/Date, ACPI, CPU/Mem, Hostname) set-option -g status-format[1] "#[align=centre]#[fg=red][Pending Updates: #(checkupdates | wc -l || echo "N/A")] #[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]" # Ensure window list is properly justified # 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 -n F1 select-window -t 1 bind -n F2 select-window -t 2 bind -n F3 select-window -t 3 bind -n F4 select-window -t 4 bind -n F5 select-window -t 5 bind -n F6 select-window -t 6 bind -n F7 select-window -t 7 bind -n F8 select-window -t 8 bind -n F9 select-window -t 9 bind -n F10 select-window -t 10 #start programs new -s mysession -n "sys-mon" glances neww -n "Log" "journalctl -f" #neww -n "ARA Server" "source ~/Repos/homelab/.venv/bin/activate && ara-manage runserver" neww #neww -n "Music" ncmpcpp #neww -n "Deluge" deluge-console #reload tmux config bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." #vi keybindings set -g mode-keys vi #send actual f keys bind F1 send-keys F1 bind F2 send-keys F2 bind F3 send-keys F3 bind F4 send-keys F4 bind F5 send-keys F5 bind F6 send-keys F6 bind F7 send-keys F7 bind F8 send-keys F8 bind F9 send-keys F9 bind F10 send-keys F10 bind F11 send-keys F11 bind F12 send-keys F12 set -g history-limit 50000 set-window-option -g aggressive-resize on set-option -g automatic-rename on