diff options
author | Mattias Andrée <maandree@kth.se> | 2023-11-23 17:57:29 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-11-23 17:57:29 +0100 |
commit | e540b7fed768a77facc2993dd7307b30b49c2546 (patch) | |
tree | 32f5fc1877d0d23d9f9349bb99e3dd0ec992100c | |
parent | Fix losetup usage error in {signal,element,wire}-desktop/umount-* (diff) | |
download | dotfiles-e540b7fed768a77facc2993dd7307b30b49c2546.tar.gz dotfiles-e540b7fed768a77facc2993dd7307b30b49c2546.tar.bz2 dotfiles-e540b7fed768a77facc2993dd7307b30b49c2546.tar.xz |
Update dmenu to use different fonts (primary size due to different DPI, distance, and screen size) on different computers
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | dmenu/Makefile | 9 | ||||
-rwxr-xr-x | dmenu/dmenu | 7 | ||||
-rwxr-xr-x | dmenu/dmenu.gpp | 11 |
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 |