diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | config.def.h | 11 | ||||
| -rw-r--r-- | main.c | 3 |
3 files changed, 15 insertions, 1 deletions
@@ -1,7 +1,7 @@ # Copyright (c) 2026 Arslaan Pathan # This software is licensed under the ARPL. See LICENSE for details. CC = clang -CFLAGS = -std=gnu17 `pkg-config --cflags webkit2gtk-4.1 gtk+-3.0` +CFLAGS = -std=gnu17 `pkg-config --cflags webkit2gtk-4.1 gtk+-3.0` -Wno-deprecated-declarations LIBS = `pkg-config --libs webkit2gtk-4.1 gtk+-3.0` TARGET = cinnamon SRC = main.c diff --git a/config.def.h b/config.def.h index c69eb9f..16102aa 100644 --- a/config.def.h +++ b/config.def.h @@ -193,4 +193,15 @@ static const Command commands[] = { { "forward", &_cmd_forward }, }; + +/* User start/hooks + * Do whatever you want here, initialize whatever custom hooks you want to your heart's content. At this point config.h can just become an extension api on crack, knock yourself out + * have fun */ +/* It runs just before gtk_main(), after everything prior has been initialized. */ +void user_start(Cinnamon* cinnamon) { + /* Function has to exist or else main.c won't compile, this code is so scuffed T_T */ + /* for now just printf to see if it loads */ + printf("[user_start] starting NOW!\n"); +} + #endif @@ -87,6 +87,7 @@ static gboolean on_cmdbar_activate(GtkEntry *entry, gpointer data) { gtk_widget_hide(cinnamon->cmdbar); cmdbar_focused = false; set_mode(cinnamon, 0); + return TRUE; } static gboolean on_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data) { @@ -219,6 +220,8 @@ int main(int argc, char *argv[]) { #ifdef HIDE_TAB_BAR gtk_notebook_set_show_tabs(GTK_NOTEBOOK(cinnamon.notebook), FALSE); #endif + + user_start(&cinnamon); gtk_main(); return 0; |
