feat: add refresh_rate option for clock

This commit is contained in:
2025-07-04 03:30:29 +02:00
parent 981aa4efc7
commit ba836e5cd4
16 changed files with 133 additions and 95 deletions

View File

@@ -11,12 +11,14 @@
enum introspection_type {
STRING,
BOOL,
NUMBER,
KEY,
STRING_ARRAY,
};
static const char* NNULLABLE const INTROS_TYS_NAMES[] = {
[STRING] = "STRING",
[BOOL] = "BOOL",
[NUMBER] = "NUMBER",
[KEY] = "KEY",
[STRING_ARRAY] = "STRING_ARRAY",
};
@@ -116,7 +118,8 @@ BUILD(strings, STRINGS, TABLE_STRINGS);
F(bool, include_defshell, BOOL, true, name) \
F(struct Vector, source, STRING_ARRAY, NULL_VEC, name) \
F(struct Vector, user_source, STRING_ARRAY, NULL_VEC, name) \
F(char* NNULLABLE, timefmt, STRING, "%X %x", name)
F(char* NNULLABLE, timefmt, STRING, "%X %x", name) \
F(long long, refresh_rate, NUMBER, 100, name)
BUILD(behavior, BEHAVIOR, TABLE_BEHAVIOR);

View File

@@ -13,7 +13,7 @@
int find_keyname(enum keys* at, const char* name);
enum keys find_ansi(const char* seq);
void read_press(u_char* length, char* out);
// non blocking, waits up to tv, returns true if actually read
// non blocking, waits up to tv or interrupt, returns true if actually read
bool read_press_nb(u_char* length, char* out, struct timeval* tv);
bool utf8_iscont(char byte);