Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .tmux.conf.local
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ tmux_conf_theme_clock_style='24'
# - true
# - false (default)
# on macOS, this requires installing reattach-to-user-namespace, see README.md
# on Linux, this requires xsel or xclip
tmux_conf_copy_to_os_clipboard=false
# on Linux/X11, this requires xsel or xclip
# on Wayland, oh-my-tmux does not know wl-copy — see bindings below
tmux_conf_copy_to_os_clipboard=true


# -- user customizations -------------------------------------------------------
Expand All @@ -295,3 +296,14 @@ set -g mode-keys vi
# move status line to top
#set -g status-position top

# Wayland clipboard: this gpakosz/.tmux only pipes yanks to pbcopy/xsel/xclip.
# Ubuntu session is Wayland (wl-copy is installed; xsel/xclip are not), so copy
# mode would stay in the tmux buffer. Neovim works because it talks to wl-copy
# (or OSC 52) itself.
if-shell -b 'command -v wl-copy >/dev/null 2>&1' {
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'wl-copy'
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'wl-copy'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'
bind-key y run-shell -b 'tmux save-buffer - | wl-copy'
}