summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorwrmr2025-08-24 20:19:34 -0400
committerwrmr2025-08-24 20:19:34 -0400
commit5ff39608e0eb40043564945d52f4234f62d0285d (patch)
tree8cd3ab4cb9def95dbb34706f1bfd28fc4e7fcdbb /main.c
parent8298a7dbc7d0186a80ca02b23c41a4ef2984fb1c (diff)
stuff, TAB to toggle, move pfp.txt to ~/.bink/.client/pfp.txt
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.c b/main.c
index 728db38..47b59df 100644
--- a/main.c
+++ b/main.c
@@ -223,7 +223,7 @@ void pfp_load(Pfp *pfp, Str src, Arena *a) {
User *user_load(Str name, Str binkdir, Arena *a) {
User *u = new(a, User);
u->name = str_dup(name, a);
- FILE *f = fopen(cstr_fmt(a, "%S/pfp.txt", binkdir), "r/o");
+ FILE *f = fopen(cstr_fmt(a, "%S/.client/pfp.txt", binkdir), "r/o");
Str pfp_src = {0};
if (f) {
read_all(f, &pfp_src, a);
@@ -412,7 +412,7 @@ typedef struct {
int post_left_margin(Post *post) {
int lm = opt.margin.left;
- if (post->user->pfp.cols > lm) lm = post->user->pfp.cols;
+ if (opt.pfp_vis && post->user->pfp.cols > lm) lm = post->user->pfp.cols;
return lm;
}
@@ -720,8 +720,13 @@ refresh:
posts_refresh(&posts, &post_arena);
tagline_set("%zu users, %zu posts, %zums", post_stats.user_count, post_stats.post_count,
post_stats.gather_ns / 1000000);
+ goto resize;
+ case '\t':
+ opt.pfp_vis = !opt.pfp_vis;
/* fallthrough */
+
case KEY_RESIZE:
+resize:
arena_reset(&gfx_arena);
gfx_load(&gfx, &posts, &gfx_arena);
break;