aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dmenu/Makefile9
-rwxr-xr-xdmenu/dmenu7
-rwxr-xr-xdmenu/dmenu.gpp11
3 files changed, 18 insertions, 9 deletions
diff --git a/dmenu/Makefile b/dmenu/Makefile
index d60be4d..7183f39 100644
--- a/dmenu/Makefile
+++ b/dmenu/Makefile
@@ -1,14 +1,19 @@
.POSIX:
install:
- ../check-installed-shebang dmenu
+ ../check-installed-shebang dmenu.gpp
../check-installed-shebang ipa
../check-installed-shebang unicode
../check-installed-shebang plumb
../check-in-path vis
+ ../check-installed general-preprocessor
cd unicode.d && make
+ gpp -s '%%' < dmenu.gpp > .dmenu
+ chmod +x .dmenu
+ ../check-installed-shebang .dmenu
mkdir -p -- ~/.local/bin
- ln -sf -- ~/.dotfiles/dmenu/dmenu ~/.local/bin/
+ test ! -e ~/.local/bin/dmenu || test -L ~/.local/bin/dmenu
+ ln -sf -- ~/.dotfiles/dmenu/.dmenu ~/.local/bin/dmenu
ln -sf -- ~/.dotfiles/dmenu/ipa ~/.local/bin/
ln -sf -- ~/.dotfiles/dmenu/unicode ~/.local/bin/
ln -sf -- ~/.dotfiles/dmenu/plumb ~/.local/bin/
diff --git a/dmenu/dmenu b/dmenu/dmenu
deleted file mode 100755
index 295d297..0000000
--- a/dmenu/dmenu
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/dash
-
-if test -x /usr/local/bin/dmenu; then
- exec /usr/local/bin/dmenu -fn 'Terminus-8' "$@"
-else
- exec /usr/bin/dmenu -fn 'Terminus-8' "$@"
-fi
diff --git a/dmenu/dmenu.gpp b/dmenu/dmenu.gpp
new file mode 100755
index 0000000..11777cb
--- /dev/null
+++ b/dmenu/dmenu.gpp
@@ -0,0 +1,11 @@
+#!/bin/dash
+%%<fontname='Terminus (TTF)' ; fontsize=8
+if test -f ../.private/dmenu/font@"$(hostname)"; then
+ . ../.private/dmenu/font@"$(hostname)"
+fi
+%%>
+if test -x /usr/local/bin/dmenu; then
+ exec /usr/local/bin/dmenu -fn '%%{fontname}-%%{fontsize}' "$@"
+else
+ exec /usr/bin/dmenu -fn '%%{fontname}-%%{fontsize}' "$@"
+fi