src/rcxml.c: parse <keybind>

This commit is contained in:
Johan Malm 2020-06-19 22:00:22 +01:00
parent f6578248c0
commit 158f42d1e8
11 changed files with 108 additions and 50 deletions

View file

@ -9,17 +9,24 @@
#include "buf.h"
#define BUG_ON(condition) \
do { \
if ((condition) != 0) { \
fprintf(stderr, "Badness in %s() at %s:%d\n", \
__func__, __FILE__, __LINE__); \
} \
} while (0)
struct keybind {
uint32_t modifiers;
xkb_keysym_t *keysyms;
size_t keysyms_len;
char *action;
struct wl_list link;
uint32_t modifiers;
xkb_keysym_t *keysyms;
size_t keysyms_len;
char *action;
char *command;
struct wl_list link;
};
void keybind_add(struct wl_list *keybinds, const char *keybind, const char *action);
void keybind_init();
void keybind_print();
struct keybind *keybind_add(const char *keybind);
struct rcxml {
bool client_side_decorations;
@ -28,7 +35,6 @@ struct rcxml {
extern struct rcxml rc;
void rcxml_init();
void rcxml_parse_xml(struct buf *b);
void rcxml_read(const char *filename);
void rcxml_get_nodenames(struct buf *b);

6
include/spawn.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef SPAWN_H
#define SPAWN_H
void spawn_async_no_shell(char const *command);
#endif /* SPAWN_H */