mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-03 11:48:00 +02:00
feat: modernize config
- config now is more toml like
- no need to declare all fields, it implements defaults
- no yanderedev code, introspection babbyyy 😎
- desktop and config files parser semi-unification
- misc tweaks all over (mainly allocation failures handling)
This commit is contained in:
@@ -35,7 +35,7 @@ struct status cb(void* _ctx, char* NULLABLE table, char* key, char* value) {
|
||||
ret.finish = false;
|
||||
|
||||
if (table == NULL) return ret;
|
||||
if (strcmp(table, "[Desktop Entry]") != 0) return ret;
|
||||
if (strcmp(table, "Desktop Entry") != 0) return ret;
|
||||
|
||||
char** NULLABLE copy_at = NULL;
|
||||
if (strcmp(key, "Name") == 0) {
|
||||
@@ -117,7 +117,7 @@ static int fn(const char* fpath, const struct stat* sb, int typeflag) {
|
||||
// This code is designed to be run purely single threaded
|
||||
#define LIKELY_BOUND_SESSIONS 8
|
||||
struct Vector get_avaliable_sessions() {
|
||||
struct Vector sessions = vec_new();
|
||||
struct Vector sessions = VEC_NEW;
|
||||
vec_reserve(&sessions, LIKELY_BOUND_SESSIONS);
|
||||
|
||||
cb_sessions = &sessions;
|
||||
|
Reference in New Issue
Block a user