mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-05 08:58:44 +00:00
144 lines
3.8 KiB
Bash
Executable File
144 lines
3.8 KiB
Bash
Executable File
# ------------------
|
|
# General Settings
|
|
# ------------------
|
|
|
|
# Set Custom Prefix
|
|
set -g prefix C-a
|
|
unbind C-b
|
|
|
|
# Start in newer bash
|
|
set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/bash --login"
|
|
|
|
# Disable delay
|
|
set -sg escape-time 1
|
|
|
|
# Change the index of first window or pane to 1
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# set -g status-utf8 on
|
|
# setw -g utf8 on
|
|
|
|
# -------------------
|
|
# Visual Settings
|
|
# -------------------
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# Theme
|
|
|
|
# Theme "Tomorrow"
|
|
|
|
TMUX_PANE_BORDER_FG="#d6d6d6"
|
|
TMUX_PANE_ACTIVE_BORDER_FG="#3e999f"
|
|
TMUX_MESSAGE_FG="#3e999f"
|
|
TMUX_MESSAGE_BG="#d6d6d6"
|
|
TMUX_STATUS_BG="#efefef"
|
|
|
|
TMUX_NAMESPACE_FG="#efefef"
|
|
TMUX_NAMESPACE_BG="#c82829"
|
|
TMUX_USERNAME_FG="#efefef"
|
|
TMUX_USERNAME_BG="#f5871f"
|
|
|
|
set -g status-left-length 30
|
|
set -g status-right-length 60
|
|
|
|
set -g status-fg white
|
|
set -g status-bg $TMUX_STATUS_BG
|
|
set -g pane-border-fg $TMUX_PANE_BORDER_FG
|
|
set -g pane-active-border-fg $TMUX_PANE_ACTIVE_BORDER_FG
|
|
set -g message-fg $TMUX_MESSAGE_FG
|
|
set -g message-bg $TMUX_MESSAGE_BG
|
|
set -g message-attr bold
|
|
|
|
# Status bar
|
|
# set-option -g status-position bottom
|
|
set -g status-left '#[fg=#(echo $TMUX_NAMESPACE_FG),bg=#(echo $TMUX_NAMESPACE_BG),bold] #S #[fg=#(echo $TMUX_NAMESPACE_BG),bg=#(echo $TMUX_USERNAME_BG),bold]#[fg=#(echo $TMUX_STATUS_BG),bg=#(echo $TMUX_USERNAME_BG),bold] #(whoami) #[fg=#(echo $TMUX_USERNAME_BG),bg=#(echo $TMUX_STATUS_BG),bold]'
|
|
set -g status-right '#[fg=#(echo $TMUX_USERNAME_BG),bg=#(echo $TMUX_NAMESPACE_FG),bold]#[fg=#(echo $TMUX_NAMESPACE_FG),bg=#(echo $TMUX_USERNAME_BG),bold] #H #[fg=#(echo $TMUX_NAMESPACE_BG),bg=#(echo $TMUX_USERNAME_BG),bold]#[fg=#(echo $TMUX_NAMESPACE_FG),bg=#(echo $TMUX_NAMESPACE_BG),bold] #(date +%H:%M) '
|
|
set -g window-status-format "#[fg=#3e999f,bg=#efefef] #I #W "
|
|
set -g window-status-current-format "#[fg=#efefef,bg=#3e999f,noreverse,bold] #I #W "
|
|
|
|
|
|
|
|
# # Theme Default
|
|
|
|
# set -g status-left-length 30
|
|
# set -g status-right-length 60
|
|
# #
|
|
# # Colors
|
|
# set -g status-fg white
|
|
# set -g status-bg colour234
|
|
# set -g pane-border-fg colour245
|
|
# set -g pane-active-border-fg colour25
|
|
# set -g message-fg white
|
|
# set -g message-bg colour25
|
|
# set -g message-attr bold
|
|
|
|
# # Status bar
|
|
# # set-option -g status-position bottom
|
|
# set -g status-left '#[fg=colour25,bg=white,bold] #S #[fg=colour252,bg=colour238,bold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,bold]'
|
|
# set -g status-right '#[fg=colour238,bg=colour234,bold]#[fg=colour245,bg=colour238,bold] #H #[fg=colour252,bg=colour238,bold]#[fg=colour25,bg=white,bold] #(date +%H:%M) '
|
|
# set -g window-status-format "#[fg=white,bg=colour234] #I #W "
|
|
# set -g window-status-current-format "#[fg=white,bg=colour25,noreverse,bold] #I #W "
|
|
|
|
# --------------------
|
|
# 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!"
|
|
|
|
# Splits
|
|
bind v split-window -h
|
|
bind s split-window -v
|
|
|
|
# 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 p paste-buffer
|
|
bind -t vi-copy 'v' begin-selection
|
|
bind C-c run-shell "bash -c 'tmux show-buffer | reattach-to-user-namespace pbcopy'" \; display 'Copied to clipboard'
|
|
|