aboutsummaryrefslogtreecommitdiff
path: root/src/comet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/comet.c')
-rw-r--r--src/comet.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/comet.c b/src/comet.c
index 07fb8cf..737e0f3 100644
--- a/src/comet.c
+++ b/src/comet.c
@@ -214,7 +214,7 @@ static void register_buttons(State *state, Color color, Color line_color, Color
// Cpu usage button
Button *cpu_btn = button_simple_create(PANGO_ALIGN_RIGHT, color, line_color);
- button_simple_set_text(cpu_btn, "cpu", text_color);
+ button_simple_set_text(cpu_btn, " ?%", text_color);
button_simple_set_action(cpu_btn, show_action, state);
state_add_button(state, cpu_btn);
@@ -308,18 +308,27 @@ int main(int argc, char **argv)
state_add_button(state, q_btn);
// Test button group
+ Color orange = { 1, 0.647, 0, 1 };
+ Button *group = button_group_create(PANGO_ALIGN_LEFT, orange, line_color);
+
Button *child1 = button_simple_create(PANGO_ALIGN_CENTER, color, line_color);
- button_simple_set_text(child1, "C1", text_color);
- button_simple_set_action(child1, show_action, &date_ctx);
+ button_set_padding(child1, 1);
+ button_simple_set_text(child1, "Open", text_color);
+ button_simple_set_action(child1, show_action, NULL);
Button *child2 = button_simple_create(PANGO_ALIGN_CENTER, color, line_color);
- button_simple_set_text(child2, "C2", text_color);
- button_simple_set_action(child2, show_action, &date_ctx);
+ button_set_padding(child2, 1);
+ button_simple_set_text(child2, "Firefox", text_color);
+ button_simple_set_action(child2, show_action, NULL);
+
+ Button *child3 = button_simple_create(PANGO_ALIGN_CENTER, color, line_color);
+ button_set_padding(child3, 0);
+ button_simple_set_text(child3, "Alacritty", text_color);
+ button_simple_set_action(child3, show_action, NULL);
- Color orange = { 1, 0.647, 0, 1 };
- Button *group = button_group_create(PANGO_ALIGN_LEFT, orange, line_color);
button_group_append(group, child1);
button_group_append(group, child2);
+ button_group_append(group, child3);
state_add_button(state, group);
connect_attach_state(con, state);