mirror of https://github.com/sgoudham/nvim.git
feat: tmux theme for Dark Catppuccino and a base tmux conf
parent
fb5002b231
commit
5054482864
@ -0,0 +1,115 @@
|
||||
# these are general settings for Tmux unrelated to Catppuccino
|
||||
# Dependencies:
|
||||
# + xclip
|
||||
|
||||
# ----------------------------=== Settings ===--------------------------
|
||||
|
||||
# --------=== General
|
||||
# set -g default-terminal "screen-256color" # colors!
|
||||
# set -g default-terminal "xterm-kitty" # colors!
|
||||
# set -g default-terminal "xterm-256color" # colors!, DON't USE THIS generates problems with keyboard and other stuff
|
||||
set -g default-terminal "tmux-256color"
|
||||
|
||||
# useful for fixing mismatching nvim colors while on Alacritty and other terminals. Follow: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
# set-option -ga terminal-overrides ",tmux-256color:Tc"
|
||||
setw -g xterm-keys on
|
||||
set -s focus-events on
|
||||
|
||||
# faster command sequences aka no delay when pressing certain keys (e.g. Esc)
|
||||
set -sg escape-time 0
|
||||
set -sg repeat-time 400 # increase repeat timeout
|
||||
|
||||
# --------=== Other
|
||||
|
||||
# Automatically set window title
|
||||
set-window-option -g automatic-rename on
|
||||
set-option -g set-titles on
|
||||
set -g history-limit 50000
|
||||
set -g mouse on
|
||||
setw -q -g utf8 on # charset
|
||||
|
||||
# --------=== Display
|
||||
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
set -g set-titles on # set terminal title
|
||||
set -g display-panes-time 800 # slightly longer pane indicators display time
|
||||
set -g display-time 1000 # slightly longer status messages display time
|
||||
set -g status-interval 0 # redraw status line every 10 seconds
|
||||
|
||||
# --------=== Activity
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
# set -g bell-action none
|
||||
# set -g visual-bell off
|
||||
# set -g visual-silence off
|
||||
|
||||
# ----------------------------=== Key Bindings ===--------------------------
|
||||
|
||||
# see `man tmux`
|
||||
# NOTE: -n: no prefix
|
||||
# NOTE: -r: prefix not required after being pressed for `repeat-time`
|
||||
|
||||
set-option -g prefix M-f # change default tmux prefix from Ctrl+b to Alt+f
|
||||
|
||||
bind r source-file ~/.tmux.conf # source .tmux.conf at $HOME
|
||||
|
||||
bind-key v split-window -h -c "#{pane_current_path}" # horizontally split current window
|
||||
bind-key s split-window -v -c "#{pane_current_path}" # vertically split current window
|
||||
|
||||
bind-key -r b set-option status # toggle statusline
|
||||
|
||||
bind-key g display-popup -E "tmux new-session -A -s scratch" # aka floating terminal
|
||||
|
||||
# thanks https://unix.stackexchange.com/a/525770
|
||||
bind -n M-PageDown swap-window -d -t -1 # Move current window to the left and switch to it
|
||||
bind -n M-PageUp swap-window -d -t +1 # Move current window to the right and switch to it
|
||||
# bind -n C-S-Left swap-window -d -t -1
|
||||
# bind -n C-S-Right swap-window -d -t +1
|
||||
|
||||
bind-key j choose-tree -swZ # TUI for moving around open windows
|
||||
|
||||
bind-key J resize-pane -D 5
|
||||
bind-key K resize-pane -U 5
|
||||
bind-key H resize-pane -L 5
|
||||
bind-key L resize-pane -R 5
|
||||
|
||||
bind-key -n -r M-t new-window -c "#{pane_current_path}" # spawn a window in cwd
|
||||
bind-key -n -r M-w kill-window # kill current window
|
||||
bind-key -n -r M-c kill-pane # kill current pane
|
||||
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 0
|
||||
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' # use system clipboard
|
||||
|
||||
|
||||
# bind-key -n M-S-Left resize-pane -D
|
||||
# bind-key -n M-S-Right resize-pane -U
|
||||
# bind-key -n M-S-Up resize-pane -L
|
||||
# bind-key -n M-S-Down resize-pane -R
|
||||
|
||||
# Use Alt-arrow keys without the prefix to switch panes
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# Shift arrow to switch windows
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
|
||||
# ----------------------------=== Modes ===--------------------------
|
||||
|
||||
set -g status-keys vi # vi status
|
||||
setw -g mode-keys vi # vi shortcuts
|
@ -0,0 +1,70 @@
|
||||
# ----------------------------=== Colorscheme ===--------------------------
|
||||
|
||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
||||
# WARNING: hex colors can't contain capital letters
|
||||
|
||||
# --> Dark Catppuccino
|
||||
thm_bg="#0e171c"
|
||||
thm_fg="#abb2bf"
|
||||
thm_fg_gutter="#3b4261"
|
||||
thm_black="#393b44"
|
||||
thm_gray="#2a2e36"
|
||||
thm_red="#c94f6d"
|
||||
thm_green="#97c374"
|
||||
thm_yellow="#dbc074"
|
||||
thm_blue="#61afef"
|
||||
thm_magenta="#c678dd"
|
||||
thm_cyan="#63cdcf"
|
||||
thm_white="#dfdfe0"
|
||||
thm_orange="#f4a261"
|
||||
thm_pink="#d67ad2"
|
||||
thm_black_br="#7f8c98"
|
||||
thm_red_br="#e06c75"
|
||||
thm_green_br="#58cd8b"
|
||||
thm_yellow_br="#ffe37e"
|
||||
thm_blue_br="#84cee4"
|
||||
thm_magenta_br="#b8a1e3"
|
||||
thm_cyan_br="#59f0ff"
|
||||
thm_white_br="#fdebc3"
|
||||
thm_orange_br="#f6a878"
|
||||
thm_pink_br="#df97db"
|
||||
|
||||
# ----------------------------=== Theme ===--------------------------
|
||||
|
||||
# status
|
||||
set -g status-position top
|
||||
set -g status "on"
|
||||
set -g status-bg "${thm_bg}"
|
||||
set -g status-justify "left"
|
||||
set -g status-left-length "100"
|
||||
set -g status-right-length "100"
|
||||
|
||||
# messages
|
||||
set -g message-style fg="${thm_white_br}",bg="${thm_gray}",align="centre"
|
||||
set -g message-command-style fg="${thm_white_br}",bg="${thm_gray}",align="centre"
|
||||
|
||||
# panes
|
||||
set -g pane-border-style fg="${thm_gray}"
|
||||
set -g pane-active-border-style fg="${thm_blue_br}"
|
||||
|
||||
# windows
|
||||
setw -g window-status-activity-style fg="${thm_fg}",bg="${thm_bg}",none
|
||||
setw -g window-status-separator ""
|
||||
setw -g window-status-style fg="${thm_fg}",bg="${thm_bg}",none
|
||||
|
||||
# --------=== Statusline
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right "#[fg=$thm_magenta,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green_br]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green_br]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||
|
||||
# current_dir
|
||||
setw -g window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||
setw -g window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_white_br,bg=$thm_bg] #{b:pane_current_path} "
|
||||
|
||||
# parent_dir/current_dir
|
||||
# setw -g window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev) "
|
||||
# setw -g window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev) "
|
||||
|
||||
# --------=== Modes
|
||||
setw -g clock-mode-colour "${thm_blue}"
|
||||
setw -g mode-style "fg=${thm_yellow} bg=${thm_bg} bold"
|
Loading…
Reference in New Issue