summaryrefslogtreecommitdiffstats
path: root/konversation/scripts/sayclip
diff options
context:
space:
mode:
Diffstat (limited to 'konversation/scripts/sayclip')
-rwxr-xr-xkonversation/scripts/sayclip19
1 files changed, 19 insertions, 0 deletions
diff --git a/konversation/scripts/sayclip b/konversation/scripts/sayclip
new file mode 100755
index 0000000..06b8234
--- /dev/null
+++ b/konversation/scripts/sayclip
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Prints the contents of the clipbaord into Konversation with flood protection.
+# Klipper must be running.
+# Usage: /exec sayclip [pause-time]
+# Pause time defaults to 1 second.
+# By Gary Cramblitt (garycramblitt@comcast.net)
+# Use however you wish.
+
+PORT=$1;
+SERVER=$2;
+TARGET=$3;
+PAUSETIME="1s";
+if [ -n "$4" ]
+then
+ PAUSETIME="$4"
+fi
+
+dcop klipper klipper getClipboardContents | while read line; do dcop $PORT default say $SERVER "$TARGET" " $line"; sleep $PAUSETIME; done