summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-07-09 22:50:57 +0500
committerAnton Bobov <anton@bobov.name>2024-07-09 22:50:57 +0500
commit021c919294d83e8610d1d2f99914a0b92523740c (patch)
tree02fa191b18ab9778b8fa1eb085e102e976f4eb2e
parent68d72de4c4b69fcac17c04609ff76960214d7bc0 (diff)
Toggle clipman on clipboard stream
-rwxr-xr-xclipboard-stream14
-rwxr-xr-xskype10
2 files changed, 14 insertions, 10 deletions
diff --git a/clipboard-stream b/clipboard-stream
index a1f0cdc..a1defc6 100755
--- a/clipboard-stream
+++ b/clipboard-stream
@@ -13,7 +13,21 @@ find_clipboard_command() {
fi
}
+clipman_settings() {
+ xfconf-query -c xfce4-panel -p /plugins/clipman/settings/enable-actions "$@" 2>/dev/null
+}
+
+restore_clipman_actions() {
+ if [ -n "$1" ]; then
+ clipman_settings -s "$1"
+ fi
+}
+
main() {
+ CLIPMAN_ACTION_STATE=$(clipman_settings || echo)
+ trap 'restore_clipman_actions "$CLIPMAN_ACTION_STATE"' EXIT
+ clipman_settings -s 'false' >/dev/null || true
+
CLIPBOARD_COMMAND=$(find_clipboard_command)
recent_value=$(eval "$CLIPBOARD_COMMAND")
while true; do
diff --git a/skype b/skype
deleted file mode 100755
index 30890e0..0000000
--- a/skype
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-SCR="/usr/local/bin/skype-call-recorder"
-
-if [ -f "$SCR" ] ; then
- if !(pgrep skype-call-reco >/dev/null 2>&1) ; then
- "$SCR" &
- fi
-fi
-PULSE_LATENCY_MSEC=30 exec /usr/bin/skype $*