diff --git a/makefile b/makefile index 30cafb6..8a9f7c3 100644 --- a/makefile +++ b/makefile @@ -9,7 +9,7 @@ PREFIX ?= /usr/local INSTALL ?= install LIBS := gtk+-3.0 gmodule-export-2.0 -CFLAGS += -std=c11 $(shell pkg-config --cflags $(LIBS)) +CFLAGS += -std=c11 -fPIC $(shell pkg-config --cflags $(LIBS)) LDLIBS += $(shell pkg-config --libs $(LIBS)) SRC = $(wildcard *.c) diff --git a/source.c b/source.c index 1f6d256..f7c5535 100644 --- a/source.c +++ b/source.c @@ -17,6 +17,7 @@ struct powerbar { GtkWidget *poweroff_button; }; +const gchar module_name[] = "powerbar"; const gchar module_version[] = "v1.3.6"; static int self_id; @@ -26,7 +27,7 @@ static gboolean linked_buttons = FALSE; static gchar *reboot_command = "systemctl reboot"; static gchar *poweroff_command = "systemctl -i poweroff"; -static GOptionEntry powerbar_entries[] = { +GOptionEntry module_entries[] = { { "show-labels", 0, 0, G_OPTION_ARG_NONE, &show_labels, NULL, NULL }, { "linked-buttons", 0, 0, G_OPTION_ARG_NONE, &linked_buttons, NULL, NULL }, { "reboot-command", 0, 0, G_OPTION_ARG_STRING, &reboot_command, NULL, NULL }, @@ -84,7 +85,6 @@ static void setup_powerbar(struct Window *ctx) { void on_activation(struct GtkLock *gtklock, int id) { self_id = id; - config_load(gtklock->config_path, "powerbar", powerbar_entries); } void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window *old) {