use independent getfont.sh script
This commit is contained in:
parent
e7692af8b7
commit
43d62a0b4c
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ options:
|
||||
|
||||
config.h:
|
||||
sed "s/HOSTNAME/$(shell cat /etc/hostname)/; \
|
||||
s/FONT/\"$(shell ../getfont.sh freedesktop)\"/" \
|
||||
s/FONT/\"$(shell ./getfont.sh freedesktop)\"/" \
|
||||
config.def.h > config.h
|
||||
|
||||
.c.o:
|
||||
|
14
getfont.sh
Executable file
14
getfont.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/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