feat(clipboard): add an in-memory clipboard history with search and paste #41

Closed
BlackAngelTV wants to merge 27 commits from feat/clipboard-history into main
pull from: feat/clipboard-history
2 changed files with 14 additions and 3 deletions
Showing only changes of commit 3981f09666 - Show all commits

No files matched your search

+5 -3
View File
@@ -285,12 +285,14 @@ written by a program that marks its request as private (by passing a ``pw``
field in an *OSC 5522* write request) is never recorded, and neither is anything
copied to the primary selection. Images and other non-text data are ignored.
To bind both actions, add something like this to :file:`kitty.conf`:
Both actions have a default shortcut: :kbd:`kitty_mod+shift+v` opens the
history and :kbd:`kitty_mod+shift+f` asks for a fuzzy query before showing the
list. To use different keys, add for example to :file:`kitty.conf`:
.. code-block:: conf
map kitty_mod+shift+v paste_from_clipboard_history
map kitty_mod+shift+f search_clipboard_history
map kitty_mod+shift+h paste_from_clipboard_history
map kitty_mod+shift+g search_clipboard_history
The size of the history is fixed at 50 entries, 64 KiB per entry and 1 MiB in
total, so that a few large copies cannot use an unbounded amount of memory.
+9
View File
@@ -3956,6 +3956,15 @@ map(
'paste_from_selection shift+insert paste_from_selection',
)
map(
'Paste from clipboard history',
'paste_from_clipboard_history --allow-fallback=shifted,ascii kitty_mod+shift+v paste_from_clipboard_history',
)
map(
'Search the clipboard history',
'search_clipboard_history --allow-fallback=shifted,ascii kitty_mod+shift+f search_clipboard_history',
)
map(
'Pass selection to program',
'pass_selection_to_program --allow-fallback=shifted,ascii kitty_mod+o pass_selection_to_program',