From e540b7fed768a77facc2993dd7307b30b49c2546 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 23 Nov 2023 17:57:29 +0100 Subject: Update dmenu to use different fonts (primary size due to different DPI, distance, and screen size) on different computers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dmenu/Makefile | 9 +++++++-- dmenu/dmenu | 7 ------- dmenu/dmenu.gpp | 11 +++++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) delete mode 100755 dmenu/dmenu create mode 100755 dmenu/dmenu.gpp 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 +%% +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 -- cgit v1.2.3-70-g09d2