Last active
April 23, 2020 04:33
-
-
Save hazelement/eb3be4b044b9d7cec4b4e6f6a78f7425 to your computer and use it in GitHub Desktop.
machine_config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the lines with the options you want to activate (by deleting the preceding "#") | |
# Allow mouse interaction | |
set-option -g mouse on | |
# Change prefix key to CTRL+A. "C-" stands for CTRL, "M-" stands for ALT key | |
set-option -g prefix C-k | |
unbind C-b | |
bind C-k send-prefix | |
set-option -g repeat-time 1 | |
###################### | |
# most used bindings # | |
###################### | |
# detach tmux session | |
bind -n C-z detach | |
# create/kill window/pane | |
bind -n C-t new-window | |
bind -n C-j split-window -h | |
bind -n C-l split-window -v | |
bind -n C-q kill-pane | |
# select window by tab number | |
bind -n C-1 select-window -t 1 | |
bind -n C-2 select-window -t 2 | |
bind -n C-3 select-window -t 3 | |
bind -n C-4 select-window -t 4 | |
bind -n C-5 select-window -t 5 | |
bind -n C-6 select-window -t 6 | |
bind 1 select-window -t 1 | |
bind 2 select-window -t 2 | |
bind 3 select-window -t 3 | |
bind 4 select-window -t 4 | |
bind 5 select-window -t 5 | |
bind 6 select-window -t 6 | |
# Use Alt-arrow keys without prefix key to switch panes | |
bind -n C-a select-pane -L | |
bind -n C-d select-pane -R | |
bind -n C-w select-pane -U | |
bind -n C-s select-pane -D | |
# Shift arrow to switch windows | |
bind -n C-u previous-window | |
bind -n C-o next-window | |
# Reload tmux config | |
bind -n C-r source-file ~/.tmux.conf | |
# unbind key | |
unbind -n Escape | |
unbind -n Tab | |
unbind -n C-k | |
# unbind -n Tab | |
# unbind -n Tab | |
# No delay for escape key press | |
set -sg escape-time 0 | |
###################### | |
###### THEME ###### | |
###################### | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g status-interval 1 | |
set-option -g automatic-rename on | |
set-option -g automatic-rename-format '#{b:pane_current_path}' | |
set-option -g status-position top | |
set -g pane-border-status top | |
set -g pane-border-format "#{pane_current_path}: #{pane_current_command}" | |
set -g default-terminal "screen-256color" | |
set -g set-titles on | |
set -g set-titles-string "tmux.#I.#W" | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 | |
setw -g mode-keys vi | |
setw -g monitor-activity on | |
set -g pane-active-border-style fg='colour154' | |
set -g status-style bg='#44475a',fg='colour154' | |
set -g status-interval 1 | |
set-window-option -g window-status-style fg='colour154',bg=default | |
set-window-option -g window-status-current-style fg='colour154',bg='#282a36' | |
set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=black]#[bg=colour154] #I #W #[fg=#bd93f9]#[bg=#44475a]" | |
set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a]" | |
set -g window-style 'fg=colour247,bg=colour236' | |
set -g window-active-style 'fg=colour250,bg=black' | |
# set -g status-right '#[fg=#8be9fd,bg=#44475a]#[fg=#44475a,bg=#8be9fd] #(tmux-mem-cpu-load -g 5 --interval 2) ' | |
set -g status-right '#[fg=#f8f8f2,bg=#44475a]#[fg=#f8f8f2,bg=#44475a] Uptime #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") ' | |
set -ga status-right '#[fg=#f8f8f2,bg=#8be9fd]#[fg=#f8f8f2,bg=#44475a] %a %H:%M:%S #[fg=#f8f8f2]%Y-%m-%d ' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment