aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dmenu/Makefile19
-rwxr-xr-xdmenu/ipa208
-rwxr-xr-xdmenu/man39
-rwxr-xr-xdmenu/unicode5
-rw-r--r--dmenu/unicode.d/Makefile19
-rwxr-xr-xdmenu/unicode.d/conv8
6 files changed, 298 insertions, 0 deletions
diff --git a/dmenu/Makefile b/dmenu/Makefile
new file mode 100644
index 0000000..151ba9c
--- /dev/null
+++ b/dmenu/Makefile
@@ -0,0 +1,19 @@
+.POSIX:
+include ../common.mk
+
+install:
+ $(CHECK_INSTALLED) dash
+ $(CHECK_INSTALLED) vis
+ make -C unicode.d
+ mkdir -p -- ~/.local/bin
+ ln -sf -- ~/.dotfiles/dmenu/man ~/.local/bin/
+ ln -sf -- ~/.dotfiles/dmenu/ipa ~/.local/bin/
+ ln -sf -- ~/.dotfiles/dmenu/unicode ~/.local/bin/
+
+uninstall:
+ -unlink -- ~/.local/bin/man
+ -unlink -- ~/.local/bin/ipa
+ -unlink -- ~/.local/bin/unicode
+ -make -C unicode.d reallyclean
+
+.PHONY: install uninstall
diff --git a/dmenu/ipa b/dmenu/ipa
new file mode 100755
index 0000000..102e242
--- /dev/null
+++ b/dmenu/ipa
@@ -0,0 +1,208 @@
+#!/bin/dash
+
+# https://www.unicode.org/charts/PDF/U1D80.pdf
+# https://www.unicode.org/charts/PDF/U0250.pdf
+
+sed 's/^\([^ ]*\) \([^ ]*\) /\2 \1 /g' <<EOF | dmenu -i -l 30 -fn 'mono-14' "$@" | cut -d ' ' -f 1 | tr -d '\n' | ifne vis-clipboard --copy
+1D80 ᶀ LATIN SMALL LETTER B WITH PALATAL HOOK
+1D81 ᶁ LATIN SMALL LETTER D WITH PALATAL HOOK
+1D82 ᶂ LATIN SMALL LETTER F WITH PALATAL HOOK
+1D83 ᶃ LATIN SMALL LETTER G WITH PALATAL HOOK
+1D84 ᶄ LATIN SMALL LETTER K WITH PALATAL HOOK
+1D85 ᶅ LATIN SMALL LETTER L WITH PALATAL HOOK
+1D86 ᶆ LATIN SMALL LETTER M WITH PALATAL HOOK
+1D87 ᶇ LATIN SMALL LETTER N WITH PALATAL HOOK
+1D88 ᶈ LATIN SMALL LETTER P WITH PALATAL HOOK
+1D89 ᶉ LATIN SMALL LETTER R WITH PALATAL HOOK
+1D8A ᶊ LATIN SMALL LETTER S WITH PALATAL HOOK
+1D8B ᶋ LATIN SMALL LETTER ESH WITH PALATAL HOOK
+1D8C ᶌ LATIN SMALL LETTER V WITH PALATAL HOOK
+1D8D ᶍ LATIN SMALL LETTER X WITH PALATAL HOOK
+1D8E ᶎ LATIN SMALL LETTER Z WITH PALATAL HOOK
+1D8F ᶏ LATIN SMALL LETTER A WITH RETROFLEX HOOK
+1D90 ᶐ LATIN SMALL LETTER ALPHA WITH RETROFLEX HOOK
+1D91 ᶑ LATIN SMALL LETTER D WITH HOOK AND TAIL
+1D92 ᶒ LATIN SMALL LETTER E WITH RETROFLEX HOOK
+1D93 ᶓ LATIN SMALL LETTER OPEN E WITH RETROFLEX HOOK
+1D94 ᶔ LATIN SMALL LETTER REVERSED OPEN E WITH RETROFLEX HOOK
+1D95 ᶕ LATIN SMALL LETTER SCHWA WITH RETROFLEX HOOK
+1D96 ᶖ LATIN SMALL LETTER I WITH RETROFLEX HOOK
+1D97 ᶗ LATIN SMALL LETTER OPEN O WITH RETROFLEX HOOK
+1D98 ᶘ LATIN SMALL LETTER ESH WITH RETROFLEX HOOK
+1D99 ᶙ LATIN SMALL LETTER U WITH RETROFLEX HOOK
+1D9A ᶚ LATIN SMALL LETTER EZH WITH RETROFLEX HOOK
+1D9B ᶛ MODIFIER LETTER SMALL TURNED ALPHA
+1D9C ᶜ MODIFIER LETTER SMALL C
+1D9D ᶝ MODIFIER LETTER SMALL C WITH CURL
+1D9E ᶞ MODIFIER LETTER SMALL ETH
+1D9F ᶟ MODIFIER LETTER SMALL REVERSED OPEN E
+1DA0 ᶠ MODIFIER LETTER SMALL F
+1DA1 ᶡ MODIFIER LETTER SMALL DOTLESS J WITH STROKE
+1DA2 ᶢ MODIFIER LETTER SMALL SCRIPT G
+1DA3 ᶣ MODIFIER LETTER SMALL TURNED H
+1DA4 ᶤ MODIFIER LETTER SMALL I WITH STROKE
+1DA5 ᶥ MODIFIER LETTER SMALL IOTA
+1DA6 ᶦ MODIFIER LETTER SMALL CAPITAL I
+1DA7 ᶧ MODIFIER LETTER SMALL CAPITAL I WITH STROKE
+1DA8 ᶨ MODIFIER LETTER SMALL J WITH CROSSEDTAIL
+1DA9 ᶩ MODIFIER LETTER SMALL L WITH RETROFLEX HOOK
+1DAA ᶪ MODIFIER LETTER SMALL L WITH PALATAL HOOK
+1DAB ᶫ MODIFIER LETTER SMALL CAPITAL L
+1DAC ᶬ MODIFIER LETTER SMALL M WITH HOOK
+1DAD ᶭ MODIFIER LETTER SMALL TURNED M WITH LONG LEG
+1DAE ᶮ MODIFIER LETTER SMALL N WITH LEFT HOOK
+1DAF ᶯ MODIFIER LETTER SMALL N WITH RETROFLEX HOOK
+1DB0 ᶰ MODIFIER LETTER SMALL CAPITAL N
+1DB1 ᶱ MODIFIER LETTER SMALL BARRED O
+1DB2 ᶲ MODIFIER LETTER SMALL PHI
+1DB3 ᶳ MODIFIER LETTER SMALL S WITH HOOK
+1DB4 ᶴ MODIFIER LETTER SMALL ESH
+1DB5 ᶵ MODIFIER LETTER SMALL T WITH PALATAL HOOK
+1DB6 ᶶ MODIFIER LETTER SMALL U BAR
+1DB7 ᶷ MODIFIER LETTER SMALL UPSILON
+1DB8 ᶸ MODIFIER LETTER SMALL CAPITAL U
+1DB9 ᶹ MODIFIER LETTER SMALL V WITH HOOK
+1DBA ᶺ MODIFIER LETTER SMALL TURNED V
+1DBB ᶻ MODIFIER LETTER SMALL Z
+1DBC ᶼ MODIFIER LETTER SMALL Z WITH RETROFLEX HOOK
+1DBD ᶽ MODIFIER LETTER SMALL Z WITH CURL
+1DBE ᶾ MODIFIER LETTER SMALL EZH
+1DBF ᶿ MODIFIER LETTER SMALL THETA
+1D00 ᴀ LATIN LETTER SMALL CAPITAL A
+1D01 ᴁ LATIN LETTER SMALL CAPITAL AE
+1D02 ᴂ LATIN SMALL LETTER TURNED AE
+1D03 ᴃ LATIN LETTER SMALL CAPITAL BARRED B
+1D04 ᴄ LATIN LETTER SMALL CAPITAL C
+1D05 ᴅ LATIN LETTER SMALL CAPITAL D
+1D06 ᴆ LATIN LETTER SMALL CAPITAL ETH
+1D07 ᴇ LATIN LETTER SMALL CAPITAL E
+1D08 ᴈ LATIN SMALL LETTER TURNED OPEN E
+1D09 ᴉ LATIN SMALL LETTER TURNED I
+1D0A ᴊ LATIN LETTER SMALL CAPITAL J
+1D0B ᴋ LATIN LETTER SMALL CAPITAL K
+1D0C ᴌ LATIN LETTER SMALL CAPITAL L WITH STROKE
+1D0D ᴍ LATIN LETTER SMALL CAPITAL M
+1D0E ᴎ LATIN LETTER SMALL CAPITAL REVERSED N
+1D0F ᴏ LATIN LETTER SMALL CAPITAL O
+1D10 ᴐ LATIN LETTER SMALL CAPITAL OPEN O
+1D11 ᴑ LATIN SMALL LETTER SIDEWAYS O
+1D12 ᴒ LATIN SMALL LETTER SIDEWAYS OPEN O
+1D13 ᴓ LATIN SMALL LETTER SIDEWAYS O WITH STROKE
+1D14 ᴔ LATIN SMALL LETTER TURNED OE
+1D15 ᴕ LATIN LETTER SMALL CAPITAL OU
+1D16 ᴖ LATIN SMALL LETTER TOP HALF O
+1D17 ᴗ LATIN SMALL LETTER BOTTOM HALF O
+1D18 ᴘ LATIN LETTER SMALL CAPITAL P
+1D19 ᴙ LATIN LETTER SMALL CAPITAL REVERSED R
+1D1A ᴚ LATIN LETTER SMALL CAPITAL TURNED R
+1D1B ᴛ LATIN LETTER SMALL CAPITAL T
+1D1C ᴜ LATIN LETTER SMALL CAPITAL U
+1D1D ᴝ LATIN SMALL LETTER SIDEWAYS U
+1D1E ᴞ LATIN SMALL LETTER SIDEWAYS DIAERESIZED U
+1D1F ᴟ LATIN SMALL LETTER SIDEWAYS TURNED M
+1D20 ᴠ LATIN LETTER SMALL CAPITAL V
+1D21 ᴡ LATIN LETTER SMALL CAPITAL W
+1D22 ᴢ LATIN LETTER SMALL CAPITAL Z
+1D23 ᴣ LATIN LETTER SMALL CAPITAL EZH
+1D24 ᴤ LATIN LETTER VOICED LARYNGEAL SPIRANT
+1D25 ᴥ LATIN LETTER AIN
+1D26 ᴦ GREEK LETTER SMALL CAPITAL GAMMA
+1D27 ᴧ GREEK LETTER SMALL CAPITAL LAMDA
+1D28 ᴨ GREEK LETTER SMALL CAPITAL PI
+1D29 ᴩ GREEK LETTER SMALL CAPITAL RHO
+1D2A ᴪ GREEK LETTER SMALL CAPITAL PSI
+0250 ɐ LATIN SMALL LETTER TURNED A
+0251 ɑ LATIN SMALL LETTER ALPHA
+0252 ɒ LATIN SMALL LETTER TURNED ALPHA
+0253 ɓ LATIN SMALL LETTER B WITH HOOK
+0254 ɔ LATIN SMALL LETTER OPEN O
+0255 ɕ LATIN SMALL LETTER C WITH CURL
+0256 ɖ LATIN SMALL LETTER D WITH TAIL
+0257 ɗ LATIN SMALL LETTER D WITH HOOK
+0258 ɘ LATIN SMALL LETTER REVERSED E
+0259 ə LATIN SMALL LETTER SCHWA
+025A ɚ LATIN SMALL LETTER SCHWA WITH HOOK
+025B ɛ LATIN SMALL LETTER OPEN E
+025C ɜ LATIN SMALL LETTER REVERSED OPEN E
+025D ɝ LATIN SMALL LETTER REVERSED OPEN E WITH HOOK
+025E ɞ LATIN SMALL LETTER CLOSED REVERSED OPEN E
+025F ɟ LATIN SMALL LETTER DOTLESS J WITH STROKE
+0260 ɠ LATIN SMALL LETTER G WITH HOOK
+0261 ɡ LATIN SMALL LETTER SCRIPT G
+0262 ɢ LATIN LETTER SMALL CAPITAL G
+0263 ɣ LATIN SMALL LETTER GAMMA
+0264 ɤ LATIN SMALL LETTER RAMS HORN
+0265 ɥ LATIN SMALL LETTER TURNED H
+0266 ɦ LATIN SMALL LETTER H WITH HOOK
+0267 ɧ LATIN SMALL LETTER HENG WITH HOOK
+0268 ɨ LATIN SMALL LETTER I WITH STROKE
+0269 ɩ LATIN SMALL LETTER IOTA
+026A ɪ LATIN LETTER SMALL CAPITAL I
+026B ɫ LATIN SMALL LETTER L WITH MIDDLE TILDE
+026C ɬ LATIN SMALL LETTER L WITH BELT
+026D ɭ LATIN SMALL LETTER L WITH RETROFLEX HOOK
+026E ɮ LATIN SMALL LETTER LEZH
+026F ɯ LATIN SMALL LETTER TURNED M
+0270 ɰ LATIN SMALL LETTER TURNED M WITH LONG LEG
+0271 ɱ LATIN SMALL LETTER M WITH HOOK
+0272 ɲ LATIN SMALL LETTER N WITH LEFT HOOK
+0273 ɳ LATIN SMALL LETTER N WITH RETROFLEX HOOK
+0274 ɴ LATIN LETTER SMALL CAPITAL N
+0275 ɵ LATIN SMALL LETTER BARRED O
+0276 ɶ LATIN LETTER SMALL CAPITAL OE
+0277 ɷ LATIN SMALL LETTER CLOSED OMEGA
+0278 ɸ LATIN SMALL LETTER PHI
+0279 ɹ LATIN SMALL LETTER TURNED R
+027A ɺ LATIN SMALL LETTER TURNED R WITH LONG LEG
+027B ɻ LATIN SMALL LETTER TURNED R WITH HOOK
+027C ɼ LATIN SMALL LETTER R WITH LONG LEG
+027D ɽ LATIN SMALL LETTER R WITH TAIL
+027E ɾ LATIN SMALL LETTER R WITH FISHHOOK
+027F ɿ LATIN SMALL LETTER REVERSED R WITH FISHHOOK
+0280 ʀ LATIN LETTER SMALL CAPITAL R
+0281 ʁ LATIN LETTER SMALL CAPITAL INVERTED R
+0282 ʂ LATIN SMALL LETTER S WITH HOOK
+0283 ʃ LATIN SMALL LETTER ESH
+0284 ʄ LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK
+0285 ʅ LATIN SMALL LETTER SQUAT REVERSED ESH
+0286 ʆ LATIN SMALL LETTER ESH WITH CURL
+0287 ʇ LATIN SMALL LETTER TURNED T
+0288 ʈ LATIN SMALL LETTER T WITH RETROFLEX HOOK
+0289 ʉ LATIN SMALL LETTER U BAR
+028A ʊ LATIN SMALL LETTER UPSILON
+028B ʋ LATIN SMALL LETTER V WITH HOOK
+028C ʌ LATIN SMALL LETTER TURNED V
+028D ʍ LATIN SMALL LETTER TURNED W
+028E ʎ LATIN SMALL LETTER TURNED Y
+028F ʏ LATIN LETTER SMALL CAPITAL Y
+0290 ʐ LATIN SMALL LETTER Z WITH RETROFLEX HOOK
+0291 ʑ LATIN SMALL LETTER Z WITH CURL
+0292 ʒ LATIN SMALL LETTER EZH
+0293 ʓ LATIN SMALL LETTER EZH WITH CURL
+0294 ʔ LATIN LETTER GLOTTAL STOP
+0295 ʕ LATIN LETTER PHARYNGEAL VOICED FRICATIVE
+0296 ʖ LATIN LETTER INVERTED GLOTTAL STOP
+0297 ʗ LATIN LETTER STRETCHED C
+0298 ʘ LATIN LETTER BILABIAL CLICK
+0299 ʙ LATIN LETTER SMALL CAPITAL B
+029A ʚ LATIN SMALL LETTER CLOSED OPEN E
+029B ʛ LATIN LETTER SMALL CAPITAL G WITH HOOK
+029C ʜ LATIN LETTER SMALL CAPITAL H
+029D ʝ LATIN SMALL LETTER J WITH CROSSED-TAIL
+029E ʞ LATIN SMALL LETTER TURNED K
+029F ʟ LATIN LETTER SMALL CAPITAL L
+02A0 ʠ LATIN SMALL LETTER Q WITH HOOK
+02A1 ʡ LATIN LETTER GLOTTAL STOP WITH STROKE
+02A2 ʢ LATIN LETTER REVERSED GLOTTAL STOP WITH
+02A3 ʣ LATIN SMALL LETTER DZ DIGRAPH
+02A4 ʤ LATIN SMALL LETTER DEZH DIGRAPH
+02A5 ʥ LATIN SMALL LETTER DZ DIGRAPH WITH CURL
+02A6 ʦ LATIN SMALL LETTER TS DIGRAPH
+02A7 ʧ LATIN SMALL LETTER TESH DIGRAPH
+02A8 ʨ LATIN SMALL LETTER TC DIGRAPH WITH CURL
+02A9 ʩ LATIN SMALL LETTER FENG DIGRAPH
+02AA ʪ LATIN SMALL LETTER LS DIGRAPH
+02AB ʫ LATIN SMALL LETTER LZ DIGRAPH
+02AC ʬ LATIN LETTER BILABIAL PERCUSSIVE
+02AD ʭ LATIN LETTER BIDENTAL PERCUSSIVE
+EOF
diff --git a/dmenu/man b/dmenu/man
new file mode 100755
index 0000000..1b29656
--- /dev/null
+++ b/dmenu/man
@@ -0,0 +1,39 @@
+#!/bin/dash
+
+# Browse with dmenu if no page has been specified
+if test $# = 0; then
+ manpage="$(/usr/bin/man -k '' | dmenu -l 40 | sed 's/^\([^ ]*\) (\([^)]*\)).*$/\2 \1/')"
+ if test -z "$manpage"; then
+ exit 1
+ fi
+ set $manpage
+fi
+
+
+# Bold
+export LESS_TERMCAP_md="$(printf '\033[01;34m')"
+export LESS_TERMCAP_me="$(printf '\033[0m')"
+
+# Italic
+export LESS_TERMCAP_us="$(printf '\033[01;04;32m')"
+export LESS_TERMCAP_ue="$(printf '\033[0m')"
+
+# Reverse video
+if test "$TERM" = linux; then
+ export LESS_TERMCAP_so="$(printf '\033[07m')"
+else
+ export LESS_TERMCAP_so="$(printf '\033[07;01m')"
+fi
+export LESS_TERMCAP_se="$(printf '\033[0m')"
+
+
+# Display, open new terminal if in the background
+if isfg; then
+ exec /usr/bin/man "$@"
+elif test -x /usr/bin/terminator; then
+ exec terminator -e "/usr/bin/man $*"
+elif test -x /usr/bin/st; then
+ exec st -e /usr/bin/man "$@"
+else
+ exec xterm -e /usr/bin/man "$@"
+fi
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