Created
May 14, 2017 08:30
-
-
Save algesten/0ba2d7c19763db6a7396126e8526b65b to your computer and use it in GitHub Desktop.
A tmux.conf with pbcopy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# propagate titles to the window | |
set -g set-titles on | |
# Minimalist window title "0:bash" | |
set -g set-titles-string "#I:#W" | |
# show colors | |
set -g default-terminal "screen-256color" | |
# rename window to current process | |
set-window-option -g automatic-rename on | |
# this enables mouse selections and scroll wheel | |
set -g mouse on | |
# Update all bindings to integrate copy-buffer with macOS. | |
# brew install reattach-to-user-namespace | |
unbind-key -T copy-mode M-w | |
bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" | |
bind-key -T copy-mode Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" | |
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X stop-selection | |
# I keep dragging when just selecting the window. | |
unbind-key -T root MouseDrag1Pane | |
# Double clicking selects the word also when not in copy-mode. | |
bind-key -T root DoubleClick1Pane select-pane \; copy-mode \; send-keys -X select-word | |
# Start new window on Ctrl-n. Mapped to Command-n in .alacritty.yml | |
# This matches the behaviour of the Terminal app for starting new windows. | |
bind-key -T root C-n new-window | |
# C-o both cleans the screen and history. Mapped to Command-k in .alacritty.yml | |
# This matches the behaviour of Terminal app to quickly clear all. | |
bind-key -T root C-o send-keys C-l \; run-shell "sleep .3s" \; clear-history | |
# Ctrl-Left/Right to cycle the windows | |
bind-key -T root C-Left previous-window | |
bind-key -T root C-Right next-window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!