Bug 235455 - Wish: Interface klipper to stdin/stdout
Summary: Wish: Interface klipper to stdin/stdout
Status: RESOLVED INTENTIONAL
Alias: None
Product: klipper
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Esben Mose Hansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 17:20 UTC by Bugs Kde Org
Modified: 2021-04-01 21:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bugs Kde Org 2010-04-26 17:20:32 UTC
Version:           v0.9.7 (using 4.3.4 (KDE 4.3.4), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.32-3-686

Currently the clipboard can be set using:

cat input | qdbus org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents "$(cat -)"

But it would be nice if this had a prettier syntax. Maybe:

cat input | klipper 

or:

cat input | klipper --stdin

Likewise it would be nice to have this for stdout.

klipper --stdout | cat

should do:

qdbus org.kde.klipper /klipper org.kde.klipper.klipper.getClipboardContents | cat
Comment 1 Hans-Rudi Denzler 2010-04-27 14:56:07 UTC
alias klipper='cat <<eof | qdbus org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents "$(cat -)"'

> klipper
> hello
> eof

bashref.html > 3.6.6 Here Documents
Comment 2 Jekyll Wu 2011-12-26 08:20:11 UTC
It is easier to implement the suggested prettier syntax in a simple script than in klipper itself.

https://github.com/milianw/shell-helpers/blob/733e03563b7978ab11d3edd7b6175196ecadfec1/clipboard
Comment 3 Nate Graham 2021-04-01 21:13:37 UTC
Indeed. :)