tmux: continue tweaking
This commit is contained in:
18
tmux.conf
18
tmux.conf
@@ -55,19 +55,27 @@ set -w -g mode-keys vi
|
|||||||
bind -T copy-mode-vi v send -X begin-selection
|
bind -T copy-mode-vi v send -X begin-selection
|
||||||
bind -T copy-mode-vi y send -X copy-selection
|
bind -T copy-mode-vi y send -X copy-selection
|
||||||
|
|
||||||
# I'm not a keyboard fanatic; enable the mouse.
|
# I'm not a keyboard fanatic; however, if the mouse is enabled it stops "click to highlight" (for example, in PuTTY/MobaXterm etc)
|
||||||
set -g mouse on
|
set -g mouse off
|
||||||
|
|
||||||
# Enable the pretty colours...
|
# Enable the pretty colours...
|
||||||
# If there are problems with outdated ncurses's's's, we can use "screen-256color" instead.
|
# If there are problems with outdated ncurses's's's, we can use "screen-256color" instead.
|
||||||
set -g default-terminal "tmux-256color"
|
# set -g default-terminal "tmux-256color"
|
||||||
|
|
||||||
|
# Try and make clipboard work?
|
||||||
|
# Allow things inside tmux to set system clipboard. That's what I expect anyway so let's try it.
|
||||||
|
# set -gs set-clipboard on
|
||||||
|
|
||||||
|
# set -as terminal-features ',rxvt-unicode-256color:clipboard'
|
||||||
|
# set -as terminal-features ',tmux-256color:clipboard'
|
||||||
|
# set -as terminal-features ',xterm-256color:clipboard'
|
||||||
|
|
||||||
# Override terminal for 32-bit RGB colour. (Disabled for now, need to test with MobaXterm.)
|
# Override terminal for 32-bit RGB colour. (Disabled for now, need to test with MobaXterm.)
|
||||||
# set -a terminal-overrides ",*256col*:RGB"
|
# set -a terminal-overrides ",*256col*:RGB"
|
||||||
|
|
||||||
# Make it obvious which pane we're in.
|
# Make it obvious which pane we're in.
|
||||||
set -w -g pane-active-border-style fg=black,bg=color140
|
# set -w -g pane-active-border-style fg=black,bg=color140
|
||||||
set -g pane-border-indicators arrows
|
# set -g pane-border-indicators arrows
|
||||||
|
|
||||||
# Give the panes their own status indicator.
|
# Give the panes their own status indicator.
|
||||||
set -g pane-border-status top
|
set -g pane-border-status top
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
# Detect the display server protocol and set clipboard commands
|
# Detect the display server protocol and set clipboard commands
|
||||||
if-shell '[ "$XDG_SESSION_TYPE" = "wayland" ]' \
|
# if-shell '[ "$XDG_SESSION_TYPE" = "wayland" ]' \
|
||||||
'set -g copy-command "wl-copy"; set -g paste-command "wl-paste -n"' \
|
# 'set -g copy-command "wl-copy"; set -g paste-command "wl-paste -n"' \
|
||||||
'set -g copy-command "xclip -sel clip -i"; set -g paste-command "xclip -sel clip -o"'
|
# 'set -g copy-command "xclip -sel clip -i"; set -g paste-command "xclip -sel clip -o"'
|
||||||
|
|
||||||
# Take the buffer and send it to the system clipboard
|
# Take the buffer and send it to the system clipboard
|
||||||
bind C-c run "tmux save-buffer - | $copy_command"
|
bind C-c run 'tmux save-buffer - | pbcopy_l'
|
||||||
|
|
||||||
# y in copy mode takes selection and sends it to system clipboard
|
# y in copy mode takes selection and sends it to system clipboard
|
||||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "$copy_command"
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy_l"
|
||||||
|
|
||||||
# And the reverse - Prefix Ctrl-v fills tmux buffer from system clipboard, then
|
# And the reverse - Prefix Ctrl-v fills tmux buffer from system clipboard, then
|
||||||
# pastes from buffer into tmux window
|
# pastes from buffer into tmux window
|
||||||
bind C-v run-shell '$paste_command | tmux load-buffer - \; paste-buffer'
|
bind C-v run-shell 'pbpaste_l | tmux load-buffer - \; paste-buffer'
|
||||||
|
|||||||
Reference in New Issue
Block a user