[dev] utf8 insertion tool

From: Calvin Morrison <mutantturkey_AT_gmail.com>
Date: Mon, 25 Mar 2019 10:52:37 -0400

hi guys,

one thing missing on my setup forever was an easy way to do utf8
insertion on X11. anyway i had a think abouit it and the script turned
out to be easy enough if you borrow /lib/keyboard from 9front and use
dmenu.

I have the below shitty oneliner tagged to Alt-U in my i3 bindings,
then type in what you want and xdotool will insert it for you

calvin_AT_bison:~$ cat ~/bin/utf8
#!/usr/bin/rc

line=`{sed -e 's,\t, ,g' /lib/keyboard | dmenu -l 10 }
code=`{echo $line | awk '{print $1}'}
if(! ~ $code '') {
  xdotool key U$code
}

only thing i don't like is that drw.c doesn't implement anything to
deal with the ^I control character so, i'm using sed in the pipeline
to just turn it into a space, otherwise it renders weird.

Whatever, maybe someone will find it useful. screen shot attached

Calvin

2019-03-25-102145_3286x1080_scrot.png
(image/png attachment: 2019-03-25-102145_3286x1080_scrot.png)

Received on Mon Mar 25 2019 - 15:52:37 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 26 2019 - 12:36:07 CET