- Added script to monitor the status of the input caret

This commit is contained in:
Ben Reaves
2020-02-15 20:09:50 -06:00
parent 93daf8707e
commit 8f1795339e

10
system-config/caret_status.sh Executable file
View File

@@ -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