config.h (1602B)
#pragma once
#define VERSION "v1.10"
// recommended, pass as chrome for reddit feeds
#define USER_AGENT \
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 " \
"Safari/537.36"
// seconds timeout for feed HTTP fetch
#define TIMEOUT 15
// source file for RSS URLS, one per line
// folder and file must exist
#define FEEDS "~/.config/readr/feeds"
// verify SSL chain and ensure non-expiry and revoke status free
#define VERIFY_SSL_PEER 1
// enforce SSL cert is for the given host
#define VERIFY_SSL_HOST 1
// limited by the theorical limit of your OS "threads per process"
// 2048 (safe), up to 8196 if configured on modern macOS
#define MAX_FEEDS 512
// folder must exist, file will be automatically created
// can technically be cloud shared, dropbox etc. for replication
#define DB_PATH "~/.config/readr/posts.sqlite"
// the width of the left column (in chars)
#define FEED_CAP 26
// colours, for colour options, see termbox2.h
#define LOGO_COLOR (TB_WHITE | TB_BRIGHT)
#define TEXT_COLOR (TB_WHITE | TB_DIM)
#define BACK_COLOR TB_DEFAULT
#define LINE_COLOR (TB_WHITE | TB_DIM)
#define FEED_COLOR TB_CYAN
#define POST_COLOR (TB_YELLOW)
#define DOMAIN_COLOR (TB_RED | TB_DIM)
#define SEEN_COLOR (TB_YELLOW | TB_DIM)
// how many posts we want to see per feed
#define MAX_POST_PER_FEED 100
// allocation caps, best not to fiddle with this
#define POSTS_CAP 128
#define FEEDS_CAP 32
#define TITLE_CAP 128 + 10
#define DOMAIN_CAP 64
#define URL_CAP 8192