summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index d6f79c2..b3f3b09 100644
--- a/ui.c
+++ b/ui.c
@@ -960,7 +960,8 @@ void uiRead(void) {
 
 static const time_t Signatures[] = {
 	0x6C72696774616301, // no heat, unread, unreadWarm
-	0x6C72696774616302,
+	0x6C72696774616302, // no self.pos
+	0x6C72696774616303,
 };
 
 static size_t signatureVersion(time_t signature) {
@@ -981,7 +982,8 @@ int uiSave(const char *name) {
 	FILE *file = dataOpen(name, "w");
 	if (!file) return -1;
 
-	if (writeTime(file, Signatures[1])) return -1;
+	if (writeTime(file, Signatures[2])) return -1;
+	if (writeTime(file, self.pos)) return -1;
 	for (uint num = 0; num < windows.len; ++num) {
 		const struct Window *window = windows.ptrs[num];
 		if (writeString(file, idNames[window->id])) return -1;
@@ -1032,6 +1034,10 @@ void uiLoad(const char *name) {
 	}
 	size_t version = signatureVersion(signature);
 
+	if (version > 1) {
+		self.pos = readTime(file);
+	}
+
 	char *buf = NULL;
 	size_t cap = 0;
 	while (0 < readString(file, &buf, &cap)) {
='nohover-highlight'> 2021-02-07Add bindings for brightness controlJune McEnroe Weirdly the Fn key doesn't change how the F row registers... I wonder if I can do something about that. 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 11 is what I use on macOS, but I feel like my eyes are working harder here. 2021-02-07Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe