Skip to content

Commit

Permalink
chore: update tmux config
Browse files Browse the repository at this point in the history
  • Loading branch information
fisenkodv committed Mar 12, 2024
1 parent 5200014 commit 70c2e05
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 111 deletions.
25 changes: 25 additions & 0 deletions config/tmux/reset.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#### Key bindings

# Reload settings
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"

# Open current directory
bind o run-shell "open #{pane_current_path}"
bind -r e kill-pane -a

# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R

# Moving window
bind-key -n C-S-Left swap-window -t -1 \; previous-window
bind-key -n C-S-Right swap-window -t +1 \; next-window

# Resizing pane
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
bind -r m resize-pane -Z
31 changes: 0 additions & 31 deletions config/tmux/statusline.conf

This file was deleted.

18 changes: 18 additions & 0 deletions config/tmux/theme.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
set-option -gq status "on"
set-option -gq status-bg "#303446"
set-option -gq status-justify "left"
set-option -gq status-left-length 100
set-option -gq status-right-length 100
set-option -gq message-style "fg=#99d1db,bg=#414559,align=centre"
set-option -gq message-command-style "fg=#99d1db,bg=#414559,align=centre"
set-option -gq pane-border-style "fg=#414559"
set-option -gq pane-active-border-style "fg=#8caaee"
set-window-option -gq window-status-activity-style "fg=#c6d0f5,bg=#303446,none"
set-window-option -gq window-status-separator ""
set-window-option -gq window-status-style "fg=#c6d0f5,bg=#303446,none"
set-window-option -gq window-status-format "#[fg=#8caaee,bg=#303446]█#[fg=#414559,bg=#8caaee]#I#[fg=#8caaee,bg=#414559,nobold,nounderscore,noitalics]█ #[fg=#c6d0f5,bg=#414559]#{b:pane_current_path}#[fg=#414559,bg=#303446,nobold,nounderscore,noitalics]█"
set-window-option -gq window-status-current-format "#[fg=#ef9f76,bg=#303446]█#[fg=#303446,bg=#ef9f76]#I#[fg=#ef9f76,bg=#303446,nobold,nounderscore,noitalics]█ #[fg=#c6d0f5,bg=#303446]#{b:pane_current_path}#[fg=#303446,bg=#303446,nobold,nounderscore,noitalics]█"
set-option -gq status-left ""
set-option -gq status-right "#[fg=#292c3c,bg=#a6d189] #W #[fg=#303446,bg=#e78284] #S #[fg=#303446,bg=#ca9ee6] #H #[fg=#303446,bg=#ca9ee6]"
set-window-option -gq clock-mode-colour "#8caaee"
set-window-option -gq mode-style "fg=#f4b8e4 bg=#626880 bold"
96 changes: 16 additions & 80 deletions config/tmux/tmux.conf
Original file line number Diff line number Diff line change
@@ -1,91 +1,27 @@
#set -g default-terminal "tmux-256color"
source-file ~/.config/tmux/reset.conf

set -g default-terminal "xterm-256color"
#set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
# action key
# unbind C-b
# set-option -g prefix C-t
set-option -g repeat-time 0
set-option -g focus-events on

#### Key bindings

set-window-option -g mode-keys vi

#bind t send-key C-t
# Reload settings
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
# Open current directory
bind o run-shell "open #{pane_current_path}"
bind -r e kill-pane -a

# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R

# Moving window
bind-key -n C-S-Left swap-window -t -1 \; previous-window
bind-key -n C-S-Right swap-window -t +1 \; next-window

# Resizing pane
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
bind -r m resize-pane -Z

#### basic settings

set-option -g status-justify "left"
#set-option utf8-default on
#set-option -g mouse-select-pane
set-option -g mouse on
set-window-option -g mode-keys vi
#set-window-option -g utf8 on
# look'n feel
set-option -g status-fg cyan
set-option -g status-bg black
set -g pane-active-border-style fg=colour166,bg=default
set -g window-style fg=colour10,bg=default
set -g window-active-style fg=colour12,bg=default
set-option -g history-limit 64096

set -sg escape-time 10

#### COLOUR

# default statusbar colors
set-option -g status-style bg=colour235,fg=colour136,default

# default window title colors
set-window-option -g window-status-style fg=colour244,bg=colour234,dim

# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default,bright

# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour136,bg=colour235

# message text
set-option -g message-style bg=colour235,fg=colour166

# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
set -g repeat-time 0
set -g focus-events on

# clock
set-window-option -g clock-mode-colour colour64 #green
#set -g prefix C-t # action key
set -g base-index 1 # start indexing windows at 1 instead of 0
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g escape-time 0 # zero-out escape time delay
set -g history-limit 64096 # increase history size (from 2,000)
set -g renumber-windows on # renumber all windows when any window is closed
set -g set-clipboard on # use system clipboard
set -g status-position top # macOS / darwin style
set -g default-terminal "${TERM}"
set -g mouse on

# allow the title bar to adapt to whatever host you connect to
set -g set-titles on
set -g set-titles-string "#T"
# set-window-option -g mode-keys vi

# import
if-shell "uname -s | grep -q Darwin" "source ~/.config/tmux/macos.conf"

source ~/.config/tmux/statusline.conf
source ~/.config/tmux/theme.conf
source ~/.config/tmux/utility.conf
source ~/.config/tmux/tpm.conf
1 change: 1 addition & 0 deletions config/tmux/tpm.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

Expand Down

0 comments on commit 70c2e05

Please sign in to comment.