add function and keybind to exit wm, improve main loop

This commit is contained in:
2023-03-26 18:20:28 +02:00
parent a80fcebf04
commit 98ff93e7c0
2 changed files with 117 additions and 51 deletions

4
wm.h
View File

@ -117,6 +117,7 @@ struct Wm {
Display *display;
Monitor *monitors;
Monitor *smon;
bool running;
int wm_mc;
bool other_wm;
Client root;
@ -149,6 +150,8 @@ void wm_spawn(Wm* wm, char **str);
void wm_switch_ws(Wm* wm, int ws);
void wm_mainloop(Wm* wm);
void wm_init(Wm *wm);
void wm_exit(Wm *wm);
void wm_init_cfg_def(Wm *wm);
void wm_grab_keys(Wm *wm);
@ -156,6 +159,7 @@ void wm_kb_spawn(Wm *wm, Arg *args);
void wm_kb_kill(Wm *wm, Arg *args);
void wm_kb_switch_ws(Wm *wm, Arg *args);
void wm_kb_focus_dir(Wm *wm, Arg *args);
void wm_kb_exit(Wm* wm, Arg *args);
void wm_keybinds_init_def(Wm *wm);