aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--config.def.h11
-rw-r--r--main.c3
3 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9ddf943..37b0149 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/main.c b/main.c
index 8bc8246..2374d61 100644
--- a/main.c
+++ b/main.c
@@ -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;