From e40a03306c4b45303923fa302d86d6fcc4af0b31 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 18 May 2022 09:03:55 +0100 Subject: tinkering with tmux for no known reason --- tmux.conf | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'tmux.conf') diff --git a/tmux.conf b/tmux.conf index a6c0317..6840a53 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,12 +1,18 @@ +# I got some additional config in 2022 from https://findelabs.com/post/openbsd-with-tmux/ # unbind some default keybindings unbind C-b +# set shell +#set -g default-shell '/bin/ksh' + # command sequence for nested tmux sessions bind-key a send-prefix # set prefix key to ctrl-a set -g prefix C-a +set-option -g status-interval 60 + # lower command delay set -sg escape-time 1 @@ -42,6 +48,8 @@ bind -r l select-pane -R bind -r C-h select-window -t :- bind -r C-l select-window -t :+ +# history limit to 10K lines +set -g history-limit 10000 # shift-movement keys will resize panes bind -r H resize-pane -L 5 @@ -49,6 +57,22 @@ bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 +# make mouse useful in copy mode +set -g mouse on + +# ctl-left/right keys +set-window-option -g xterm-keys on + +# Configure Ctrl+Arrow keys to create and navigate through windows +bind -n C-Left previous-window +bind -n C-Right next-window +bind -n C-Up new-window +bind -n C-Down confirm-before -p "kill-window #P? (y/n)" kill-window + +# Set visual notifications - these are quite nippy +setw -g monitor-activity off +set -g visual-activity off + # disable mouse support (at least while we're learning) # setw -g mode-mouse off # set -g mouse-select-pane off @@ -62,6 +86,10 @@ bind p paste-buffer #bind -t vi-copy 'y' copy-selection # fiddle with colors of status bar +# set color for status bar +#set-option -g status-bg colour240 +set-option -g status-bg black +set-option -g status-fg yellow #set -g status-position bottom #set -g status-style "bg=colour1" #set -g status-style "fg=colour137" @@ -72,8 +100,14 @@ bind p paste-buffer #set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' ##set -g status-right-length 5 ##set -g status-left-length 20 -## -##setw -g window-status-current-style "fg=colour81" + +# show hostname and IP address on the left side of status bar +#set-option -g status-left-length 100 +#set -g status-left ' #( sysctl -n vm.loadavg ) ' - this isn't useful + +# show session name, window, pane number, date and time on right side +set -g status-right-length 100 + ##setw -g window-status-current-bg colour238 ##setw -g window-status-current-style bold #setw -g window-status-current-format ' #[bg=colour237]#I#[fg=colour250]:#[fg=colour255]#[bg=colour237]#W#[fg=colour50]#F ' @@ -125,12 +159,7 @@ 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 -# this is supposed to grab powerline for tmux but it disnae work -#run-shell "powerline-daemon -q" -#source "/usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf" #List of plugins set -g @plugin 'tmux-plugins/tpm' @@ -138,17 +167,9 @@ set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-yank' -# Other examples: -# set -g @plugin 'github_username/plugin_name' -# set -g @plugin 'git@github.com/user/plugin' -# set -g @plugin 'git@bitbucket.com/user/plugin' - set -g @resurrect-save 'Q' set -g @resurrect-restore 'R' -# gcalcli config -# -set-option -g status-interval 60 + run-shell ~/.tmux-resurrect/resurrect.tmux -#set-option -g status-left "#[fg=blue,bright]#(gcalcli agenda | head -2 | tail -1)#[default]" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' -- cgit v1.2.3