From 3ca1fbf41f0234a352b35a3f7b1bbf7c6a050581 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Sun, 7 Mar 2021 16:22:15 +0000 Subject: [PATCH] integrate with private dotfiles --- Makefile | 4 +++- README | 2 ++ config.def.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4d49649..1255ddc 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,9 @@ options: @echo "CC = $(CC)" config.h: - cp config.def.h config.h + sed "s/HOSTNAME/$(shell cat /etc/hostname)/; \ + s/FONT/\"$(shell ../getfont.sh freedesktop)\"/" \ + config.def.h > config.h .c.o: $(CC) $(STCFLAGS) -c $< diff --git a/README b/README index 6a846ed..e84606f 100644 --- a/README +++ b/README @@ -13,6 +13,8 @@ Installation Edit config.mk to match your local setup (st is installed into the /usr/local namespace by default). +Copy config.def.h to config.h and replace `FONT` with font of choice. + Afterwards enter the following command to build and install st (if necessary as root): diff --git a/config.def.h b/config.def.h index 26ce030..d8aaa72 100644 --- a/config.def.h +++ b/config.def.h @@ -5,7 +5,7 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "Inconsolata:pixelsize=17:antialias=true:autohint=true"; +static char *font = FONT; static int borderpx = 2; /*