summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@tutanota.com>2024-08-07 22:59:45 -0400
committerLouie Shprung <lshprung@tutanota.com>2024-08-07 22:59:45 -0400
commit9e999c82f830f48ebabc72338ef721154acd116a (patch)
tree1eeb04fef220f9e9256acb2f81e0df44e502587e
parenta18a8b783d71859e01c550b0acf6e0cefbef0d9f (diff)
Small improvement towards setting launchers, but the current group class makes this a headache
-rw-r--r--src/read_cfg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/read_cfg.c b/src/read_cfg.c
index 940630b..549393b 100644
--- a/src/read_cfg.c
+++ b/src/read_cfg.c
@@ -78,8 +78,16 @@ bool cfg_interp(char *path){
if(lua_type(L, -2) != LUA_TSTRING) continue; // skip if invalid key
group_name = lua_tostring(L, -2);
group_add(group_name, NULL);
- // add each entry
+ // check for a launcher
if(lua_type(L, -1) != LUA_TTABLE) continue; // skip if invalid value
+ lua_pushstring(L, "Launcher");
+ lua_gettable(L, -2);
+ if(lua_type(L, -1) == LUA_TSTRING) {
+ // FIXME the groups '''API''' I built might need some improvements in order for this to not be a headache
+ //set_gprog(GROUP *g, lua_tostring(L, -1))
+ }
+ lua_pop(L, 1);
+ // add each entry
lua_pushstring(L, "Entries");
lua_gettable(L, -2);
j = lua_gettop(L);