summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2017-12-29 20:03:46 +0000
committerokan <okan>2017-12-29 20:03:46 +0000
commit6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2 (patch)
tree6e842f14936d6a213a69c49587ce62cb92512925 /calmwm.h
parent43db5b55eaae67515ae926c0d195c1ef6aa4b607 (diff)
downloadcwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.tar.gz
cwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.tar.xz
cwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.zip
Convert menu-exec-wm from an abritrary exec menu, into a config-based menu from
which one may configure (wm <name> <path_and_args>) (and choose) specific
window managers to replace the running one. 'wm cwm cwm' is included by
default.

No objections and seems sensible to sthen.
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/calmwm.h b/calmwm.h
index d289ceb..0913a76 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -255,11 +255,8 @@ struct cmd_ctx {
 	char			 path[PATH_MAX];
 };
 TAILQ_HEAD(cmd_q, cmd_ctx);
+TAILQ_HEAD(wm_q, cmd_ctx);
 
-enum menu_exec {
-	CWM_MENU_EXEC_EXEC,
-	CWM_MENU_EXEC_WM
-};
 #define CWM_MENU_DUMMY		0x0001
 #define CWM_MENU_FILE		0x0002
 #define CWM_MENU_LIST		0x0004
@@ -284,6 +281,7 @@ struct conf {
 	struct autogroup_q	 autogroupq;
 	struct ignore_q		 ignoreq;
 	struct cmd_q		 cmdq;
+	struct wm_q		 wmq;
 	int			 ngroups;
 	int			 stickygroups;
 	int			 nameqlen;
@@ -457,10 +455,13 @@ void			 search_match_cmd(struct menu_q *, struct menu_q *,
 			     char *);
 void			 search_match_group(struct menu_q *, struct menu_q *,
 			     char *);
+void			 search_match_wm(struct menu_q *, struct menu_q *,
+			     char *);
 void			 search_print_client(struct menu *, int);
 void			 search_print_cmd(struct menu *, int);
 void			 search_print_group(struct menu *, int);
 void			 search_print_text(struct menu *, int);
+void			 search_print_wm(struct menu *, int);
 
 struct region_ctx	*region_find(struct screen_ctx *, int, int);
 struct geom		 screen_apply_gap(struct screen_ctx *, struct geom);
@@ -500,6 +501,7 @@ void			 kbfunc_group_alltoggle(void *, struct cargs *);
 void			 kbfunc_menu_client(void *, struct cargs *);
 void			 kbfunc_menu_cmd(void *, struct cargs *);
 void			 kbfunc_menu_group(void *, struct cargs *);
+void			 kbfunc_menu_wm(void *, struct cargs *);
 void			 kbfunc_menu_exec(void *, struct cargs *);
 void			 kbfunc_menu_ssh(void *, struct cargs *);
 void			 kbfunc_client_menu_label(void *, struct cargs *);
@@ -529,6 +531,8 @@ void			 conf_clear(struct conf *);
 void			 conf_client(struct client_ctx *);
 int			 conf_cmd_add(struct conf *, const char *,
 			     const char *);
+int			 conf_wm_add(struct conf *, const char *,
+			     const char *);
 void			 conf_cursor(struct conf *);
 void			 conf_grab_kbd(Window);
 void			 conf_grab_mouse(Window);