snippets/dmenu_charinput

15 lines
362 B
Plaintext
Raw Normal View History

2021-03-14 21:06:20 +01:00
#!/bin/sh
2021-03-14 22:03:41 +01:00
# it is probably easiest to link this and unicodedata to /usr/local/bin for use with dwm
# call this with the dmenu monitor and a single 'ranges' parameter for unicodedata
# e.g. dmenu_charinput 0 '13000..1342F 1F600..1F64F'
2021-03-14 21:07:54 +01:00
2021-03-14 21:06:20 +01:00
set -eu
2021-03-14 22:03:41 +01:00
unicodedata -ranges "$2" |
dmenu -m "$1" -i -l 10 |
2021-03-14 21:06:20 +01:00
awk '{print $1}' |
tr -d "\n" |
xclip -selection clipboard