summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-20 23:24:39 -0400
committerJune McEnroe <june@causal.agency>2018-08-20 23:24:39 -0400
commit911274a7a166585dc4dcf052c0504eabb33df76e (patch)
tree73608fe1ab57647a97e9b05ccfa1e21af3fb12a3 /bin
parentGenerate scheme.h (diff)
downloadsrc-911274a7a166585dc4dcf052c0504eabb33df76e.tar.gz
src-911274a7a166585dc4dcf052c0504eabb33df76e.zip
Use scheme.h in fbatt and fbclock
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile2
-rw-r--r--bin/fbatt.c12
-rw-r--r--bin/fbclock.c6
3 files changed, 13 insertions, 7 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 5ccf614a..6e92483d 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -21,6 +21,8 @@ tags: *.c
 scheme.h: scheme
 	./scheme -c > scheme.h
 
+fbatt.o fbclock.o: scheme.h
+
 atch: dtch
 	ln -f dtch atch
 
diff --git a/bin/fbatt.c b/bin/fbatt.c
index 3486ba59..a8256d22 100644
--- a/bin/fbatt.c
+++ b/bin/fbatt.c
@@ -27,17 +27,19 @@
 #include <sysexits.h>
 #include <unistd.h>
 
+#include "scheme.h"
+
 static const char *CLASS = "/sys/class/power_supply";
 
 static const uint32_t RIGHT  = 5 * 8 + 1; // fbclock width.
 static const uint32_t WIDTH  = 8;
 static const uint32_t HEIGHT = 16;
 
-static const uint32_t BG     = 0x161510;
-static const uint32_t BORDER = 0x7A7155;
-static const uint32_t GRAY   = 0x4C4635;
-static const uint32_t YELLOW = 0xA37720;
-static const uint32_t RED    = 0xA32810;
+static const uint32_t BG     = SCHEME.darkBlack;
+static const uint32_t BORDER = SCHEME.darkWhite;
+static const uint32_t GRAY   = SCHEME.lightBlack;
+static const uint32_t YELLOW = SCHEME.darkYellow;
+static const uint32_t RED    = SCHEME.darkRed;
 
 int main() {
 	int error;
diff --git a/bin/fbclock.c b/bin/fbclock.c
index 699ce969..1554a95e 100644
--- a/bin/fbclock.c
+++ b/bin/fbclock.c
@@ -28,6 +28,8 @@
 #include <unistd.h>
 #include <zlib.h>
 
+#include "scheme.h"
+
 static const uint32_t PSF2_MAGIC = 0x864AB572;
 struct Psf2Header {
 	uint32_t magic;
@@ -40,8 +42,8 @@ struct Psf2Header {
 	uint32_t glyphWidth;
 };
 
-static const uint32_t BG = 0x161510;
-static const uint32_t FG = 0x7A7155;
+static const uint32_t BG = SCHEME.darkBlack;
+static const uint32_t FG = SCHEME.darkWhite;
 
 int main() {
 	size_t len;
highlight'> 2024-09-25Add photos from September 15June McEnroe 2024-09-24Add photos from September 14June McEnroe 2024-09-24Add photos from September 12June McEnroe 2024-09-24Add photos from September 7June McEnroe 2024-09-24Allow not having descriptionsJune McEnroe I'm sorry, I can't keep writing descriptions. It makes posting photos take too long, I often don't know the words for what I'm looking at, and a good description is an entirely different work of art than the photo I took, and I'm just a photographer. It's visual art. 2024-09-23Automatically select the last used lens for a bodyJune McEnroe 2024-09-19Add photos from September 5June McEnroe Had to prefix the folder number onto these file names manually because they must have come out of a different scanner or something. 2024-09-15Add some more film stocks to the listJune McEnroe 2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe This seems easier to visually scan. The only other thing I'd like is a nicer date rendering but JavaScript is useless for that. 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe