mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(plugin): Add ghostty-copypaste plugin
This commit is contained in:
parent
c6482fa5be
commit
176d528f97
2 changed files with 58 additions and 0 deletions
15
plugins/ghostty-copypaste/README.md
Normal file
15
plugins/ghostty-copypaste/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# zsh-ghostty-copypaste
|
||||
|
||||
[ghostty](https://ghostty.org/) users, this `zsh` plugin allows you to copy / paste a text selected with the keyboard with `ctrl+shift+c` / `ctrl+shift+v`.
|
||||
|
||||
To use it, add `ghostty-copypaste` to the plugins array of your `.zshrc` file:
|
||||
|
||||
```
|
||||
plugins=(... ghostty-copypaste)
|
||||
```
|
||||
|
||||
## Principle
|
||||
|
||||
- `ghossty` allows to copy / paste a text selected with the mouse, but not with the keyboard, because this is an action devoted to a terminal (`zsh`) and not to a terminal emulator (`ghostty`).
|
||||
- When no mouse selection is started, `ghostty` passes a Control Sequence Introducer `^[[99;6u` / `^[[118;6u` to `zsh`. The plugin binds these CSI to the correct copy / paste functions for X11 or Wayland.
|
||||
- Be careful, `ghostty` can lose focus when copying and pasting because of `xclip` or `wl-copy`/`wl-paste` in the plugin. If you use it as a context terminal ("quake"), it is best not to close it when it loses focus.
|
||||
Loading…
Add table
Add a link
Reference in a new issue