void dbg_show_one_view(struct view *view);
void dbg_show_views(struct server *server);
+void dbg_show_keybinds();
#endif /* LABWC_H */
keybind_add(&rc.keybinds, "A-Tab", "NextWindow");
keybind_add(&rc.keybinds, "A-F3", "Execute");
}
-
-void keybind_print()
-{
- struct keybind *keybind;
- wl_list_for_each_reverse (keybind, &rc.keybinds, link) {
- printf("KEY=%s-", keybind->action);
- for (size_t i = 0; i < keybind->keysyms_len; i++)
- printf(" %d\n", keybind->keysyms[i]);
- }
-}
LIBXML_TEST_VERSION
wl_list_init(&rc.keybinds);
keybind_init();
- keybind_print();
}
void rcxml_read(const char *filename)
FILE *stream;
char *line = NULL;
size_t len = 0;
- ssize_t n_read;
struct buf b;
/* Read <filename> into buffer and then call rcxml_parse_xml() */
return;
}
buf_init(&b);
- while ((n_read = getline(&line, &len, stream) != -1)) {
+ while (getline(&line, &len, stream) != -1) {
char *p = strrchr(line, '\n');
if (p)
*p = '\0';
#include "labwc.h"
+#include "rcxml.h"
static void show_one_xdg_view(struct view *view)
{
wl_list_for_each_reverse (view, &server->views, link)
dbg_show_one_view(view);
}
+
+void dbg_show_keybinds()
+{
+ struct keybind *keybind;
+ wl_list_for_each_reverse (keybind, &rc.keybinds, link) {
+ printf("KEY=%s-", keybind->action);
+ for (size_t i = 0; i < keybind->keysyms_len; i++)
+ printf(" %d\n", keybind->keysyms[i]);
+ }
+}
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_BOTTOM));
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_LEFT));
-
if (view_hasfocus(view))
ddata.rgba = theme.window_active_title_bg_color;
else
FILE *stream;
char *line = NULL;
size_t len = 0;
- ssize_t n_read;
stream = fopen(filename, "r");
if (!stream) {
fprintf(stderr, "warn: cannot read '%s'\n", filename);
return;
}
- while ((n_read = getline(&line, &len, stream) != -1)) {
+ while (getline(&line, &len, stream) != -1) {
char *p = strrchr(line, '\n');
if (p)
*p = '\0';