summaryrefslogtreecommitdiff
path: root/shroud/utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'shroud/utils.scm')
-rw-r--r--shroud/utils.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/shroud/utils.scm b/shroud/utils.scm
index 3f28840..58695e4 100644
--- a/shroud/utils.scm
+++ b/shroud/utils.scm
@@ -20,6 +20,7 @@
#:use-module (ice-9 rdelim)
#:use-module (ice-9 vlist)
#:use-module (srfi srfi-1)
+ #:use-module (shroud config)
#:export (vhash-ref
vhash-replace
vhash-values
@@ -28,6 +29,7 @@
gpg-binary
call-with-encrypted-output-file
call-with-decrypted-input-file
+ call-with-clipboard
mkdir-p))
(define (vhash-ref vhash key)
@@ -115,6 +117,10 @@ FILE."
"--decrypt" ,file)
proc)))))
+(define (call-with-clipboard proc)
+ "Call PROC with an open output port to the X clipboard."
+ (call-with-output-pipe* (list %xclip "-selection" "clipboard") proc))
+
;; Written by Ludovic Court├Ęs for GNU Guix.
(define (mkdir-p dir)
"Create directory DIR and all its ancestors."