Skip to content

Commit

Permalink
Update tmux configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
michelegera committed Nov 14, 2023
1 parent e690b72 commit ef7376d
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/shell/config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ set -g renumber-windows on
# Disable mouse
set -g mouse off

# Rename windows based on current directory
set -g automatic-rename on
set -g automatic-rename-format '#{b:pane_current_path}'


# ----------------------------------------------------------------------------
# | Key Mappings |
Expand All @@ -31,18 +35,25 @@ unbind-key C-b
# pressing PREFIX key twice
bind C-a send-prefix

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# ----------------------------------------------------------------------------
# | Status bar |
# ----------------------------------------------------------------------------
# Use vim keybindings in copy mode
setw -g mode-keys vi

# Workaround for accessing macOS' pasteboard
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard

# Rename windows with the basename (:b) of current path
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
if-shell \
'test "$(uname -s)" = Darwin' \
'set-option -g default-command "exec reattach-to-user-namespace -l $SHELL"'

# Notify when something happens in one of the other windows
setw -g monitor-activity on
set -g visual-activity on
# Remap the copy & paste keys to work as in vim
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi "v" send-keys -X begin-selection
bind-key -T copy-mode-vi "y" send-keys -X copy-selection


# ----------------------------------------------------------------------------
Expand Down

0 comments on commit ef7376d

Please sign in to comment.