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; /*