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
Received on Mon Mar 25 2019 - 15:52:37 CET