Klipper - snippets

Stephen Dowdy sdowdy at ucar.edu
Wed Dec 28 21:54:54 GMT 2016


Michael,

I don't know the current state of KDE applications, but at least on Debian
Stable, there's a plasma applet called 'paste' that lets you paste
snippets.  It provides a few builtin macro expansions for stuff like

  %{date()}

  %{exec(netstat -plant)}

  %{file(file:///etc/motd)}

  %{password(16, true, true, true, true)}

  %{time()}

Note: doesn't appear that 'date()/time()' takes an argument (e.g.
%{date(yesterday)}, just returns current, but as long as you have exec()
you can do anything.

If you click a snippet, it inserts into the clipboard, then you can paste,
You have to double-click to auto-paste.


You could leverage the klipper Actions to do something similar, though it
would be a bit more "hackish".


Setup a regular expression like @K -- If you type, then double click that,
and have automatic enabled (or, alternatively, if you use <CTRL><ALTR><R>
to invoke manual klipper actions popupmenu), you would have a popup menu
with all your commands that could be things like:


   Command=echo FLIMFLAM

   Output Handling=Replace Clipboard

(organize as many commands that echo what you want under a single klipper
action)


then you'd just have to paste.  I don't see a way in klipper to auto-paste

Also, you can use 'khotkeys' to create a global shortcut that performs
keyboard input.  (but you'd likely run out of keyboard combos, or forget
them.)  also, i think khotkeys was destined for deprecation?

probably many other solutions.  (i recall a very simple Xt X11 application
from many years ago that did similar things)

--stephen

On Wed, Dec 28, 2016 at 2:15 PM, Michael Fierro <biffster at gmail.com> wrote:

> I have a feature request for Klipper: snippets! I can't even begin to say
> how convenient having sticky entries that I can click on and then paste
> wherever I need it. If you need an example of how these work, look either
> at the Snippets plugin for glipper or the Snippet menu in ClipMenu (Mac).
>
> --
> Michael Fierro
>
>


-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20161228/0ff2f5ca/attachment.htm>


More information about the kde mailing list