mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-06 01:18:44 +00:00
Split in folders
This commit is contained in:
Executable
+154
@@ -0,0 +1,154 @@
|
||||
# ------------------
|
||||
# General Settings
|
||||
# ------------------
|
||||
|
||||
# See: https://github.com/gpakosz/.tmux/blob/master/.tmux.conf
|
||||
|
||||
# Set Custom Prefix
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
|
||||
# Start in newer bash
|
||||
set-option -g default-command "/usr/local/bin/bash --login"
|
||||
|
||||
# Disable delay
|
||||
set -sg escape-time 1
|
||||
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
|
||||
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
|
||||
setw -q -g utf8 on
|
||||
|
||||
# -------------------
|
||||
# Visual Settings
|
||||
# -------------------
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
source-file ~/.tmux/themes/tomorrow-night.tmux
|
||||
|
||||
# Theme Variables
|
||||
|
||||
TMUX_ACTIVE_COLOR="#373b41"
|
||||
|
||||
TMUX_STATUS_TEXT_COLOR="#c5c8c6"
|
||||
TMUX_STATUS_BG="#26292c"
|
||||
|
||||
TMUX_NAMESPACE_FG="#000000"
|
||||
TMUX_STATUS_RED="#cc6666"
|
||||
|
||||
TMUX_USERNAME_FG="#000000"
|
||||
TMUX_STATUS_AQUA="#8abeb7"
|
||||
|
||||
# Styles
|
||||
STYLE_DEFAULT="fg=white,bg=$TMUX_STATUS_BG"
|
||||
STYLE_ACTIVE_ITEM="#[fg=$TMUX_STATUS_TEXT_COLOR,bg=$TMUX_ACTIVE_COLOR,noreverse,bold]"
|
||||
STYLE_RED="#[fg=$TMUX_NAMESPACE_FG,bg=$TMUX_STATUS_RED,bold]"
|
||||
STYLE_AQUA="#[fg=$TMUX_USERNAME_FG,bg=$TMUX_STATUS_AQUA,bold]"
|
||||
|
||||
# Status bar
|
||||
set-option -g status-position bottom
|
||||
|
||||
# Status mid style
|
||||
set -g status-style $STYLE_DEFAULT
|
||||
|
||||
set -g status-left "#{prefix_highlight}$STYLE_RED #S #[fg=$TMUX_STATUS_RED,bg=$TMUX_STATUS_AQUA,bold]$STYLE_AQUA #(whoami) #[fg=$TMUX_STATUS_AQUA,bg=$TMUX_STATUS_BG,bold] "
|
||||
set -g status-left-length 30
|
||||
|
||||
PC_STATS="$STYLE_ACTIVE_ITEM cpu #{cpu_icon} #{cpu_percentage} #[$STYLE_DEFAULT] $STYLE_ACTIVE_ITEM mem #{ram_icon} #{ram_percentage} #[$STYLE_DEFAULT]"
|
||||
|
||||
set -g status-right "$PC_STATS #[fg=$TMUX_STATUS_AQUA,bg=$TMUX_STATUS_BG,bold]$STYLE_AQUA #h #[fg=$TMUX_STATUS_RED,bg=$TMUX_STATUS_AQUA,bold]$STYLE_RED %a, %h %d %H:%M "
|
||||
set -g status-right-length 90
|
||||
|
||||
# window name options
|
||||
# set -g window-status-format "#[$STATUS_DEFAILT] #I #W "
|
||||
# set -g window-status-current-format "$TYLE_ACTIVE_ITEM] #I #W "
|
||||
|
||||
# Prefix style
|
||||
# https://github.com/tmux-plugins/tmux-prefix-highlight
|
||||
set -g @prefix_highlight_fg $TMUX_STATUS_TEXT_COLOR
|
||||
set -g @prefix_highlight_bg $TMUX_ACTIVE_COLOR
|
||||
|
||||
# --------------------
|
||||
# Custom keybindings
|
||||
# --------------------
|
||||
|
||||
set -g mouse on
|
||||
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
|
||||
|
||||
|
||||
setw -g mode-keys vi
|
||||
bind C-a send-prefix
|
||||
|
||||
# Unbind unused defaults
|
||||
unbind %
|
||||
unbind [
|
||||
unbind p
|
||||
|
||||
unbind Up
|
||||
unbind Down
|
||||
unbind Left
|
||||
unbind Right
|
||||
|
||||
unbind M-Up
|
||||
unbind M-Down
|
||||
unbind M-Left
|
||||
unbind M-Right
|
||||
|
||||
unbind C-Up
|
||||
unbind C-Down
|
||||
unbind C-Left
|
||||
unbind C-Right
|
||||
|
||||
# Source this file
|
||||
bind r source-file ~/.tmux.conf \; display "Config file reloaded!"
|
||||
|
||||
# split current window horizontally
|
||||
bind v split-window -h
|
||||
bind | split-window -h
|
||||
|
||||
# split current window vertically
|
||||
bind s split-window -v
|
||||
bind - split-window -v
|
||||
|
||||
# Swap panes
|
||||
bind-key -r "<" swap-window -d -t -1
|
||||
bind-key -r ">" swap-window -d -t +1
|
||||
bind-key -r n swap-pane -U
|
||||
|
||||
# Move between panes
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Move between windows
|
||||
bind -r C-h select-window -t :-
|
||||
bind -r C-l select-window -t :+
|
||||
|
||||
# Resize panes
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# Copy & Paste
|
||||
bind Escape copy-mode
|
||||
bind b list-buffers # list paste buffers
|
||||
bind p paste-buffer # paste last buffer
|
||||
bind P choose-buffer # see all buffers
|
||||
bind C-c run-shell "bash -c 'tmux show-buffer | pbcopy'" \; display 'Copied to clipboard'
|
||||
|
||||
|
||||
# Tmux Plugin manager
|
||||
# https://github.com/tmux-plugins/tpm
|
||||
|
||||
# Enabled plugins
|
||||
# install prefix I
|
||||
# update prefix u
|
||||
# uninstall all prefix alt u
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
|
||||
run -b '~/.tmux/plugins/tpm/tpm'
|
||||
Reference in New Issue
Block a user