mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 11:02:13 +02:00
116 lines
3.2 KiB
Bash
116 lines
3.2 KiB
Bash
# Open in current director# Rebind Ctrl-b to Ctrl-a
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# Start windows at index 1 instead of 0
|
|
set -g base-index 1
|
|
|
|
# Start panes at index 1 instead of 0
|
|
set -g pane-base-index 1
|
|
|
|
# Ensures that panes get reordered correctly when killing panes
|
|
set-option -g renumber-windows on
|
|
|
|
# VI-mode
|
|
set-window-option -g mode-keys vi
|
|
set-window-option -g status-keys vi
|
|
|
|
# Enable Vi copy commands
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -selection clipboard'
|
|
|
|
# Vim keybinding for resizing panes
|
|
bind -r C-h resize-pane -L # Control-a Control-h
|
|
bind -r C-j resize-pane -D # Control-a Control-j
|
|
bind -r C-k resize-pane -U # Control-a Control-k
|
|
bind -r C-l resize-pane -R # Control-a Control-l
|
|
|
|
# Vim keybinding for switching between panes
|
|
bind h select-pane -l # Control-a h
|
|
bind j select-pane -D # Control-a j
|
|
bind k select-pane -U # Control-a k
|
|
bind l select-pane -R # Control-a l
|
|
|
|
# Bind Control-a + X to kill a session
|
|
bind X kill-session
|
|
|
|
# Bind Control-a + C to create a new session
|
|
bind C new-session
|
|
|
|
# split panes using | and - and use the current working directory
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
# Create new window with current path
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# Unbinding the old keybind for splitting the pane vertically
|
|
unbind '"'
|
|
|
|
# Unbinding the old keybind for splitting the pane horizontally
|
|
unbind %
|
|
|
|
# Custom popup for system monitoring
|
|
bind-key m display-popup -w 85% -h 85% -E "bpytop"
|
|
|
|
# Disable completely the mouse
|
|
set -g mouse off
|
|
|
|
# Set the default terminal
|
|
set -s default-terminal 'tmux-256color'
|
|
|
|
# Longer workspace names
|
|
set -g status-left-length 20
|
|
|
|
# Reduce the escape time for Neovim
|
|
set-option -sg escape-time 10
|
|
|
|
# Enable focus event for Neovim
|
|
set-option -g focus-events on
|
|
|
|
# Terminal feature specific to Neovim
|
|
set-option -sa terminal-overrides ',tmux-256color:Tc'
|
|
set-option -as terminal-features ',*:RGB'
|
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
|
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
|
|
|
|
# Tmux plugin to handle tmux plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
# Tmux plugin to navigate easily between session
|
|
set -g @plugin 'tmux-plugins/tmux-sessionist'
|
|
|
|
# Tmux powerkit setup
|
|
set -g @plugin fabioluciano/tmux-powerkit
|
|
|
|
# Tmux powerkit configuration
|
|
set -g @powerkit_plugins "datetime,battery,cpu,memory,git"
|
|
set -g @powerkit_theme "tokyo-night"
|
|
set -g @powerkit_theme_variant "night"
|
|
|
|
# Choose your separator style
|
|
set -g @powerkit_separator_style "normal" # or rounded, flame, pixel, honeycomb
|
|
|
|
# Enable spacing between elements
|
|
set -g @powerkit_elements_spacing "both"
|
|
|
|
# Customize update interval
|
|
set -g @powerkit_status_interval "5"
|
|
|
|
# Make it transparent
|
|
set -g @powerkit_transparent "true"
|
|
|
|
# Set status bar at the bottom instead of top
|
|
set -g @powerkit_status_position "bottom"
|
|
|
|
# Make window titles centered
|
|
set -g @powerkit_status_justify "center"
|
|
|
|
# Tmux powerkit tokyo night
|
|
set -g @powerkit_theme "tokyo-night"
|
|
set -g @powerkit_theme_variant "night"
|
|
|
|
# Run the Tmux plugin manager
|
|
run '~/.tmux/plugins/tpm/tpm'
|