This commit is contained in:
Jovan Lanik 2022-09-14 16:05:36 +02:00
parent dff3baafd4
commit e1d1ab13ff
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ PREFIX ?= /usr/local
INSTALL ?= install INSTALL ?= install
LIBS := gtk+-3.0 gmodule-export-2.0 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)) LDLIBS += $(shell pkg-config --libs $(LIBS))
SRC = $(wildcard *.c) SRC = $(wildcard *.c)

View file

@ -17,6 +17,7 @@ struct powerbar {
GtkWidget *poweroff_button; GtkWidget *poweroff_button;
}; };
const gchar module_name[] = "powerbar";
const gchar module_version[] = "v1.3.6"; const gchar module_version[] = "v1.3.6";
static int self_id; static int self_id;
@ -26,7 +27,7 @@ static gboolean linked_buttons = FALSE;
static gchar *reboot_command = "systemctl reboot"; static gchar *reboot_command = "systemctl reboot";
static gchar *poweroff_command = "systemctl -i poweroff"; 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 }, { "show-labels", 0, 0, G_OPTION_ARG_NONE, &show_labels, NULL, NULL },
{ "linked-buttons", 0, 0, G_OPTION_ARG_NONE, &linked_buttons, 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 }, { "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) { void on_activation(struct GtkLock *gtklock, int id) {
self_id = 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) { void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window *old) {