Skip to content

Commit

Permalink
Refactored, more vim-ish and better than ever
Browse files Browse the repository at this point in the history
  • Loading branch information
NonlinearFruit committed May 30, 2024
1 parent 807e435 commit 0ab942d
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions tmux.conf
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# Reload
# Custom Bindings
## [R]eload
bind-key r source-file ~/.tmux.conf

# Kill Current session
## Kill current session
bind-key X confirm-before kill-session

# Vim Splits
## [C]reate window
unbind-key c
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key c new-window -c "#{pane_current_path}"

# Vim-ish Focus On Panes
# Vim-ish
## Copy Mode
set -wg mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel clip copy
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel clip copy
## Splits
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R

# Make Window Stuff Vi-like
set-window-option -g mode-keys vi
# Size the window to the smallest client
set -g window-size smallest

# Copy to Windows Clipboard <https://mitchellt.com/2020/04/01/copying-from-tmux-wsl-windows-terminal.html>
if-shell -b 'command -v clip.exe' {
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel clip.exe
}
# For Whom The Bell Tolls
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -wg monitor-activity off
set -g bell-action none

# Set window name to directory of current pane <https://that.guru/blog/automatically-set-tmux-window-name>
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set -g automatic-rename on
set -g automatic-rename-format '#{b:pane_current_path}'

# Satisfy nvim checkhealth <https://github.com/neovim/neovim/wiki/FAQ>
set-option -sg escape-time 10
set-option -g focus-events on
set -sg escape-time 10
set -g focus-events on

# Color Prompt
set -g default-terminal "xterm-256color"
Expand All @@ -47,8 +53,8 @@ lightest_gray="brightwhite"

light_pink="brightred"

set -g pane-border-style fg="$light_black"
set -g pane-active-border-style fg="$lighter_black"
set -g pane-border-style fg="$lighter_black"
set -g pane-active-border-style fg="$light_gray"
set -g message-style bg="$lighter_black",fg="$lightest_gray"
set -g status-style bg="$light_black",fg="$lightest_gray"
set -g status-left "#[fg=$light_black]#{?client_prefix,#[bg=$light_pink] T ,#{?#{==:#{client_key_table},off},#[fg=$light_gray]#[bg=$light_black] O ,#[bg=$light_gray] S }}"
Expand Down

0 comments on commit 0ab942d

Please sign in to comment.