From 8f1795339ef04ed4144501c29e54f04708e34fc8 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sat, 15 Feb 2020 20:09:50 -0600 Subject: [PATCH] - Added script to monitor the status of the input caret --- system-config/caret_status.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 system-config/caret_status.sh diff --git a/system-config/caret_status.sh b/system-config/caret_status.sh new file mode 100755 index 0000000..972df1f --- /dev/null +++ b/system-config/caret_status.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mkdir -p /tmp/kinto + +IBUSADD=$(cat ~/.config/ibus/bus/`ls ~/.config/ibus/bus -1rt | tail -n1` | awk -F'IBUS_ADDRESS=' '{print $2}' | xargs) +dbus-monitor --address $IBUSADD "path='/org/freedesktop/IBus/Panel/Extension/Emoji',interface='org.freedesktop.IBus.Panel',member='FocusOut'" 2> /dev/null | grep --line-buffered -o -P '(?<=object path \"/org/freedesktop/IBus/InputContext_).*(?=[\"])' | +while read ln +do + printf '%s\n' "$ln" > /tmp/kinto/caret +done