From ceed8c8bfde2a7cdc42aa787b7688571fb6ff0a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 9 Oct 2022 20:48:45 +0200 Subject: [PATCH] Added commands into .tmux.conf --- .tmux.conf | 67 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 43969f8..8145d9a 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,15 +1,38 @@ -set -g prefix C-a +# Default shell configuration set-option -g default-shell /bin/zsh set -g default-terminal "screen-256color" set -ga terminal-overrides ",*256col*:Tc" -bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer' -unbind C-b -bind-key C-a send-prefix -unbind q -bind q confirm kill-window -bind Q confirm kill-pane -set -g status on + +# Keybindings +unbind C-b # Unbind a default keys conbination +unbind q # Unbind a q key +set -g prefix C-a # Set a default keys conbination +bind-key C-a send-prefix # Set a default keys conbination +bind q confirm kill-window # Set a kill-window keybind +bind Q confirm kill-pane # Set a kill-pane keybind +bind - split-window -v # Split window vertical +bind _ split-window -h # Split window horizontal +bind > swap-pane -D # Swap current pane with the next one +bind < swap-pane -U # Swap current pane with the previous one +bind C-w select-pane -l # Go to last panel +bind h select-pane -L # Go to left panel +bind j select-pane -D # Go to down panel +bind k select-pane -U # Go to up panel +bind l select-pane -R # Go to right panel +bind -r H resize-pane -L 2 # Resize panel left +bind -r J resize-pane -D 2 # Resize panel down +bind -r K resize-pane -U 2 # Resize panel up +bind -r L resize-pane -R 2 # Resize panel right +bind -r C-h previous-window # Select previous window +bind -r C-l next-window # Select next window +bind Tab last-window # Move to last active window +bind C-c new-session # Keybind for a new session +bind C-f command-prompt -p find-session 'switch-client -t %%' bind-key -n C-f copy-mode \; send-key ? + +# Copying a output from panel the terminal to file ~/tmux.history +bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer' + set -g history-limit 20000 set-option -sg escape-time 0 set -g base-index 1 # start windows numbering at 1 @@ -23,26 +46,14 @@ set -g status-interval 10 # redraw status line every 10 seconds set -g monitor-activity on set -g visual-activity off set -g visual-bell off -bind C-c new-session -bind C-f command-prompt -p find-session 'switch-client -t %%' -bind - split-window -v -bind _ split-window -h -bind > swap-pane -D # swap current pane with the next one -bind < swap-pane -U # swap current pane with the previous one -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R -bind -r H resize-pane -L 2 -bind -r J resize-pane -D 2 -bind -r K resize-pane -U 3 -bind -r L resize-pane -R 2 -bind -r C-h previous-window # select previous window -bind -r C-l next-window # select next window -bind Tab last-window # move to last active window -# Source of example configuration -# https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/ +# Coloring of the panel +set -g pane-border-style fg=default +set -g pane-active-border-style "bg=default fg=color244" + +# Status bar +## Source of example configuration +## https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/ set-option -g status on set-option -g status-interval 1 set-option -g status-position bottom @@ -52,5 +63,3 @@ set-option -g status-left-style default set-option -g status-right-length 140 set-option -g status-right-style default set-option -g status-right "%a %H:%M:%S %Y-%m-%d" -set -g pane-border-style fg=default -set -g pane-active-border-style "bg=default fg=color244"