use external getfont.sh script
This commit is contained in:
parent
43d62a0b4c
commit
f303d37672
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ options:
|
|||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
sed "s/HOSTNAME/$(shell cat /etc/hostname)/; \
|
sed "s/HOSTNAME/$(shell cat /etc/hostname)/; \
|
||||||
s/FONT/\"$(shell ./getfont.sh freedesktop)\"/" \
|
s/FONT/\"$(shell ../getfont.sh freedesktop)\"/" \
|
||||||
config.def.h > config.h
|
config.def.h > config.h
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
|
14
getfont.sh
14
getfont.sh
@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function is_display_large {
|
|
||||||
echo yes
|
|
||||||
}
|
|
||||||
|
|
||||||
[[ $(is_display_large) ]] && FONT="Fira Code" || FONT="curie"
|
|
||||||
[[ $(is_display_large) ]] && SIZE="15" || SIZE="10"
|
|
||||||
[[ $(is_display_large) ]] || BITMAP="true"
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
pango) [[ $BITMAP ]] && echo ${FONT} wrapped $SIZE || echo $FONT $SIZE ;;
|
|
||||||
freedesktop) [[ $BITMAP ]] && echo ${FONT} || echo ${FONT}:pizelsize=${SIZE} ;;
|
|
||||||
esac
|
|
Loading…
Reference in New Issue
Block a user