summarylogtreecommitdiffstats
path: root/clipboard
diff options
context:
space:
mode:
Diffstat (limited to 'clipboard')
-rw-r--r--clipboard13
1 files changed, 13 insertions, 0 deletions
diff --git a/clipboard b/clipboard
new file mode 100644
index 00000000000..fb3660370e2
--- /dev/null
+++ b/clipboard
@@ -0,0 +1,13 @@
+#! /usr/bin/perl
+
+sub on_sel_grab
+{
+ my $query = $_[0]->selection;
+ open (my $pipe,'|-','xsel -ib') or die;
+ print $pipe $query;
+ close $pipe;
+ open (my $pipe,'|-','xsel -ip') or die;
+ print $pipe $query;
+ close $pipe;
+}
+