Skip to content

Commit faaeea2

Browse files
committed
Add Get Mouse Copy/Paste Working In Kitty as a tmux til
1 parent 4f7ce44 commit faaeea2

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
1010

1111
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
1212

13-
_990 TILs and counting..._
13+
_991 TILs and counting..._
1414

1515
---
1616

@@ -878,6 +878,7 @@ _990 TILs and counting..._
878878
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
879879
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
880880
- [Enabling Vi Mode](tmux/enabling-vi-mode.md)
881+
- [Get Mouse Copy/Paste Working In Kitty](tmux/get-mouse-copy-paste-working-in-kitty.md)
881882
- [Hiding The Status Bar](tmux/hiding-the-status-bar.md)
882883
- [Jumping Between Sessions](tmux/jumping-between-sessions.md)
883884
- [Kill All Your tmux Sessions](tmux/kill-all-your-tmux-sessions.md)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Get Mouse Copy/Paste Working In Kitty
2+
3+
With tmux's mouse mode enabled (`set-option -g -q mouse on`), you can use the
4+
mouse to make a drag selection of some text. You can then paste it within a
5+
tmux session using `Cmd+v`.
6+
7+
If you are using tmux within the [Kitty terminal
8+
emulator](https://sw.kovidgoyal.net/kitty/), you'll get more text pasted than
9+
you bargained for. Kitty's clipboard _appends_ by default. So after several
10+
selections have made there way into tmux's buffer history, a paste will result
11+
in all of those buffers values being appended together and output to the
12+
terminal.
13+
14+
To fix this, you need to change Kitty's clipboard to be `no-append`.
15+
16+
```
17+
# ~/.config/kitty/kitty.conf
18+
clipboard_control write-clipboard write-primary no-append
19+
```
20+
21+
[source](https://github.com/kovidgoyal/kitty/issues/782#issuecomment-502927322)

0 commit comments

Comments
 (0)