diff options
Diffstat (limited to 'sys/insert-char')
-rwxr-xr-x | sys/insert-char | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/insert-char b/sys/insert-char new file mode 100755 index 0000000..20ea288 --- /dev/null +++ b/sys/insert-char @@ -0,0 +1,16 @@ +#!/bin/sh + +# A simple dmenu script that grabs from a file, and inserts that character. +# File is located at: $ORGD_DATA_PATH, or $HOME/docs/wr/orgd/dt/chars. + +if [ "$ORGD_DT_PATH" = "" ]; then + notify-send "ORGD_DT_PATH empty." "Using $HOME/docs/wr/orgd/dt as fallback." + file="$HOME/docs/wr/orgd/dt/chars" +else + file="$ORGD_DT_PATH/chars" +fi + +char="$(grep -v '^#\|^[ \r\n]*$' $file | dmenu -l 25 | cut -d' ' -f1)" +notify-send "Inserted Character" "Inserted <i>$char</i>." +xdotool type --delay 0 "$char" + |