diff options
Diffstat (limited to 'src/comet.c')
| -rw-r--r-- | src/comet.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/comet.c b/src/comet.c index 617fcb5..5bcd9ac 100644 --- a/src/comet.c +++ b/src/comet.c @@ -220,12 +220,13 @@ static void menu_action(Button *btn) state_request_redraw(menu_ctx->state, true); } -static void register_buttons(State *state, Color color, Color text_color) +static void register_buttons(State *state, Color color, Color text_color, Color line_color, int line_w) { // Cpu usage button Button *cpu_btn = button_simple_create(PANGO_ALIGN_RIGHT, color); button_simple_set_text(cpu_btn, g_strdup(" 0%"), text_color); button_simple_set_action(cpu_btn, show_action, state); + button_set_line(cpu_btn, line_color, line_w); state_add_button(state, cpu_btn); cpu_update(cpu_btn); @@ -235,6 +236,7 @@ static void register_buttons(State *state, Color color, Color text_color) Button *temp_btn = button_simple_create(PANGO_ALIGN_RIGHT, color); button_simple_set_text(temp_btn, g_strdup("temp"), text_color); button_simple_set_action(temp_btn, show_action, state); + button_set_line(temp_btn, line_color, line_w); state_add_button(state, temp_btn); temp_update(temp_btn); @@ -244,6 +246,7 @@ static void register_buttons(State *state, Color color, Color text_color) Button *ram_btn = button_simple_create(PANGO_ALIGN_RIGHT, color); button_simple_set_text(ram_btn, g_strdup("ram"), text_color); button_simple_set_action(ram_btn, show_action, state); + button_set_line(ram_btn, line_color, line_w); state_add_button(state, ram_btn); ram_update(ram_btn); @@ -253,6 +256,7 @@ static void register_buttons(State *state, Color color, Color text_color) Button *disk_btn = button_simple_create(PANGO_ALIGN_RIGHT, color); button_simple_set_text(disk_btn, g_strdup("disk"), text_color); button_simple_set_action(disk_btn, show_action, state); + button_set_line(disk_btn, line_color, line_w); state_add_button(state, disk_btn); disk_update(disk_btn); @@ -287,14 +291,15 @@ int main(int argc, char **argv) Color color = { 0.4, 0.4, 0.4, 1 }; Color purple = { 0.502, 0.168, 0.886, 1 }; - //Color line_color = { 0.8, 0.8, 0.8, 1 }; + Color line_color = { 0.8, 0.8, 0.8, 1 }; Color text_color = { 0.9, 0.9, 0.9, 1 }; // Dwm tags DwmIpc *dwm = dwm_create(state, "/tmp/dwm.sock"); dwm_register_tags(dwm, color, purple, text_color); - register_buttons(state, color, text_color); + int line_w = 0; + register_buttons(state, color, text_color, line_color, line_w); // Buttons with special handling |
