Read data from clipboard managers at Linux and Mac,
- Parcellite on Linux
- ClipIt on Linux
- https://github.com/erebe/greenclip on Linux
- Flycut on macOS
The easiest way is install from melpa using package manager.
If you install from source code, please place cliphist.el somewhere (say ~/.emacs/lisp
), and insert below code into ~/.emacs
:
(add-to-list 'load-path "~/.emacs.d/lisp/")
(require 'cliphist)
Make sure the clipboard manager is running.
If you use Flycut on macOS, set up “Preferences > General > Clippings” so its value is “Save After each clip”.
M-x cliphist-paste-item
to paste item from history.C-u M-x cliphist-paste-item
rectangle paste itemM-x cliphist-select-item
to select item
(setq cliphist-select-item-callback
(lambda (num str) (cliphist-copy-to-clipboard str)))
If `cliphist-cc-kill-ring` is true, the selected/pasted string will be inserted into kill-ring.
(setq cliphist-cc-kill-ring t)
You can tweak cliphist-linux-clipboard-managers
to tell cliphist how to detect clipboard manager,
(setq cliphist-linux-clipboard-managers '("greenclip" "clipit" "parcellite"))
Set cliphist-greenclip-program
if greenclip program is not added into load-path
and you use greenclip.
Check https://github.com/redguardtoo/cliphist.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.