aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu/unicode
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-26 14:59:09 +0200
committerMattias Andrée <maandree@kth.se>2021-06-26 14:59:09 +0200
commitf62eca657a79ef81089f3c34cdf837d7463581db (patch)
treeb8bdf542c8bee229c51e9cdcaf150d68f6d2e365 /dmenu/unicode
parentAdd setkeys and setres (diff)
downloaddotfiles-f62eca657a79ef81089f3c34cdf837d7463581db.tar.gz
dotfiles-f62eca657a79ef81089f3c34cdf837d7463581db.tar.bz2
dotfiles-f62eca657a79ef81089f3c34cdf837d7463581db.tar.xz
Add ipa, man, and unicode scripts
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-xdmenu/unicode5
-rw-r--r--dmenu/unicode.d/Makefile19
-rwxr-xr-xdmenu/unicode.d/conv8
3 files changed, 32 insertions, 0 deletions
diff --git a/dmenu/unicode b/dmenu/unicode
new file mode 100755
index 0000000..a81df01
--- /dev/null
+++ b/dmenu/unicode
@@ -0,0 +1,5 @@
+#!/bin/dash
+
+dmenu -i -l 30 -fn 'mono-14' "$@" < ~/.dotfiles/dmenu/unicode.d/list | cut -d ' ' -f 1 | tr -d '\n' | ifne vis-clipboard --copy
+# TODO add support for variants
+# TODO display way of access on keyboard
diff --git a/dmenu/unicode.d/Makefile b/dmenu/unicode.d/Makefile
new file mode 100644
index 0000000..d34b4d6
--- /dev/null
+++ b/dmenu/unicode.d/Makefile
@@ -0,0 +1,19 @@
+URL = https://www.unicode.org/Public/UCD/latest/ucd/NamesList.txt
+
+all: list
+
+NamesList.txt:
+ wget -O $@ $(URL) || curl $(URL) > $@ || cp $@.backup $@
+ cp -- $@ $@.backup
+
+list: NamesList.txt
+ wget -O NamesList.txt $(URL)
+ ./conv < NamesList.txt > $@
+
+clean:
+ -rm -f -- NamesList.txt NamesList.txt.backup
+
+reallyclean: clean
+ -rm -f list
+
+.PHONY: all
diff --git a/dmenu/unicode.d/conv b/dmenu/unicode.d/conv
new file mode 100755
index 0000000..ca8fb35
--- /dev/null
+++ b/dmenu/unicode.d/conv
@@ -0,0 +1,8 @@
+#!/usr/bin/python3
+try:
+ while True:
+ cols = input().split('\t')
+ if len(cols) == 2 and '<' not in cols[1] and cols[0] and all(c in '0123456789abcdefABCDEF' for c in cols[0]):
+ print(chr(int(cols[0], 16)) + ' ' + cols[0] + ' ' + cols[1])
+except EOFError:
+ pass