commit 79967a7
0uppy
·
2026-04-08 16:31:19 +0000 UTC
parent 453b0f8
slgro 1.2 - slgro 1.2 - Replaced the old config.h for a new Lua config system (2/2)
1 files changed,
+11,
-5
+11,
-5
1@@ -9,7 +9,12 @@
2 #include <wayland-util.h>
3 #include <xkbcommon/xkbcommon-keysyms.h>
4
5-#include "config.h"
6+/* this is for lua-config.c !!! awwa!!awaw!!waw!! */
7+extern struct config cfg;
8+extern struct bind *binds;
9+extern size_t nbinds;
10+extern void load_config(void);
11+
12 #include "include/types.h"
13 #include "include/util.h"
14 #include "include/slgro.h"
15@@ -154,6 +159,7 @@ static void on_win_entered(void* data)
16 static void setup(void)
17 {
18 /* display */
19+ load_config();
20 wm.dpy = wl_display_create();
21 if (!wm.dpy)
22 die(EXIT_FAILURE, "wl_display_create failed");
23@@ -190,10 +196,10 @@ static void setup(void)
24
25 static void setup_binds(void)
26 {
27- for (size_t i = 0; i < LENGTH(binds); i++) {
28- const struct bind* b = &binds[i];
29- swc_add_binding(b->type, b->mods, b->ksym, b->fn, (void*)&b->arg);
30- }
31+ for (size_t i = 0; i < nbinds; i++) {
32+ const struct bind* b = &binds[i];
33+ swc_add_binding(b->type, b->mods, b->ksym, b->fn, (void*)&b->arg);
34+ }
35 }
36
37 static void sync_window_visibility(void)