tmux、urxvt 和複製貼上問題…

tmux、urxvt 和複製貼上問題…

我在 urxvt 中運行 tmux。我想使用滑鼠左鍵選擇和複製文本,然後使用滑鼠中鍵貼上它——我很老派。

我確實得到了tmux 複製幾乎可以工作,但需要按 SHIFT+滑鼠 1 選擇進行選擇,然後按y...這是很多按鍵。

有人知道我如何讓這個簡單的行為更好發揮作用嗎?

以下是一些版本:

; tmux -V       
tmux 2.2
; urxvt256c-ml --version 
urxvt: "version": unknown or malformed option.
rxvt-unicode (urxvt256c-ml) v9.21 - released: 2014-12-31
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
[…]
; awesome --version
awesome v3.5.9 (Mighty Ravendark)
 • Build: Mar  7 2016 18:43:56 for x86_64 by gcc version 6.0.0 (mockbuild@)
 • Compiled against Lua 5.3.2 (running with Lua 5.3)
 • D-Bus support: ✔

答案1

如果其他一些可憐的人遇到這個問題,這是我的~/.tmux.conf文件。我用tmux 外掛程式管理器所以先安裝它。

# ./tmux.conf

# Powerline…
run-shell "powerline-daemon -q"
source '~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'

# VI-mode…
setw -g mode-keys vi

# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window

# Set windows modes styles
set -g mode-style "fg=black,bg=colour69"

# Renumber windows
set -g renumber-windows on

# Automaitcally rename.
setw -g automatic-rename

# Allows for faster key repetition
set -s escape-time 0

# Scroll History
set -g history-limit 30000

# Mouse
set -g mouse on # ← This stops the default correct behaviour…

# List of plugins
set -g @plugin 'tmux-plugins/tpm' # ← The tmux plugin manager.
set -g @plugin 'nhdaly/tmux-scroll-copy-mode' # ← sane scrolling.
set -g @plugin 'tmux-plugins/tmux-yank' # ← Yanking.
set -g @shell_mode 'vi'  # tmux-yank option.
set -g @yank_selection 'primary'  # tmux-yank option.

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# EOF

因此,您可以使用滑鼠選擇您想要的任何文字。如果你擊中y 釋放滑鼠左鍵,所選內容將複製到主緩衝區中,您可以透過點擊滑鼠中鍵進行貼上。

相關內容