This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-08
Channels
- # 100-days-of-code (1)
- # announcements (7)
- # beginners (63)
- # cljs-dev (39)
- # clojure (78)
- # clojure-dev (40)
- # clojure-italy (4)
- # clojure-nl (22)
- # clojure-russia (5)
- # clojure-spec (5)
- # clojurescript (60)
- # cursive (8)
- # datomic (6)
- # emacs (1)
- # figwheel-main (53)
- # fulcro (19)
- # jobs-discuss (11)
- # mount (1)
- # off-topic (3)
- # om (1)
- # pedestal (9)
- # philosophy (1)
- # re-frame (19)
- # reagent (4)
- # reitit (5)
- # shadow-cljs (66)
- # tools-deps (64)
Just a simple idea of slurping and spitting to paste buffer that I’ve gotten a lot of use out of on osx. Easily adaptable to a linux cli tool. https://gist.github.com/uwo/23b7a81fd97818368400bb7c02086562
👍 12
Worth noting that it won't work for remote REPLs though!
I think you can do this in a platform independent way with Java interop using eg:
(defn ->clipboard [text]
(let [ss (StringSelection. text)]
(-> (Toolkit/getDefaultToolkit) .getSystemClipboard (.setContents ss ss))))
I haven't used that, but wouldn't setting the java.awt.headless
system property to true
avoid the Alt+Tab pollution?
if you set it to headless you can’t use the clipboard: HeadlessException sun.awt.HeadlessToolkit.getSystemClipboard (HeadlessToolkit.java:309)