1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Get Mouse Copy/Paste Working In Kitty as a tmux til

This commit is contained in:
jbranchaud
2021-01-01 23:54:40 -06:00
parent 4f7ce44136
commit faaeea22ab
2 changed files with 23 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
_990 TILs and counting..._
_991 TILs and counting..._
---
@@ -878,6 +878,7 @@ _990 TILs and counting..._
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
- [Enabling Vi Mode](tmux/enabling-vi-mode.md)
- [Get Mouse Copy/Paste Working In Kitty](tmux/get-mouse-copy-paste-working-in-kitty.md)
- [Hiding The Status Bar](tmux/hiding-the-status-bar.md)
- [Jumping Between Sessions](tmux/jumping-between-sessions.md)
- [Kill All Your tmux Sessions](tmux/kill-all-your-tmux-sessions.md)

View File

@@ -0,0 +1,21 @@
# Get Mouse Copy/Paste Working In Kitty
With tmux's mouse mode enabled (`set-option -g -q mouse on`), you can use the
mouse to make a drag selection of some text. You can then paste it within a
tmux session using `Cmd+v`.
If you are using tmux within the [Kitty terminal
emulator](https://sw.kovidgoyal.net/kitty/), you'll get more text pasted than
you bargained for. Kitty's clipboard _appends_ by default. So after several
selections have made there way into tmux's buffer history, a paste will result
in all of those buffers values being appended together and output to the
terminal.
To fix this, you need to change Kitty's clipboard to be `no-append`.
```
# ~/.config/kitty/kitty.conf
clipboard_control write-clipboard write-primary no-append
```
[source](https://github.com/kovidgoyal/kitty/issues/782#issuecomment-502927322)