summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/fbclock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/fbclock.c b/bin/fbclock.c
index 19a48e4b..a7798b00 100644
--- a/bin/fbclock.c
+++ b/bin/fbclock.c
@@ -45,11 +45,11 @@ struct Psf2Header {
 static const uint32_t BG = 0x1D2021;
 static const uint32_t FG = 0xA99A84;
 
-int main(int argc, char *argv[]) {
+int main() {
     size_t count;
 
-    const char *fontPath = "/usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz";
-    if (argc > 1) fontPath = argv[1];
+    const char *fontPath = getenv("FONT");
+    if (!fontPath) fontPath = "/usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz";
 
     gzFile font = gzopen(fontPath, "r");
     if (!font) err(EX_NOINPUT, "%s", fontPath);
@@ -93,6 +93,7 @@ int main(int argc, char *argv[]) {
 
         char str[64];
         size_t len = strftime(str, sizeof(str), "%H:%M", local);
+        assert(len);
 
         for (int i = 0; i < (60 - local->tm_sec); ++i) {
             uint32_t left = info.xres - header.glyphWidth * len;
tle='2019-06-15 14:00:48 -0400'>2019-06-15Add AcceptanceJune McEnroe 2019-06-07Add variables to bitJune McEnroe 2019-06-05Add A Closed and Common OrbitJune McEnroe 2019-06-02Add RebornJune McEnroe 2019-05-30Add bit to bin.7June McEnroe 2019-05-30Simplify and build bitJune McEnroe 2019-05-29Add xx -p optionJune McEnroe 2019-05-27Add FrontierJune McEnroe 2019-05-27Break nicks with ZWNJJune McEnroe 2019-05-26Add DawnJune McEnroe 2019-05-20Declare vasprintf(3) for GNUJune McEnroe 2019-05-20Fix comparison warning in ttpreJune McEnroe 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe 2019-05-10Use val instead of suboptargJune McEnroe 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe