Re: cwm quit()
Gleydson Soares <[email protected]> Fri, 4 Apr 2008 17:06:48 -0300
| Newsgroups | gmane.os.openbsd.x11 |
|---|---|
| Message-ID | <[email protected]> |
hi again,
i forgot -> switch SIGKILL to SIGTERM, sorry. diff bellow
cheers,
gsoares
Index: kbfunc.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v
retrieving revision 1.16
diff -u -r1.16 kbfunc.c
--- kbfunc.c 23 Mar 2008 15:09:21 -0000 1.16
+++ kbfunc.c 4 Apr 2008 20:01:26 -0000
@@ -485,3 +485,11 @@
{
client_vertmaximize(cc);
}
+
+void
+kbfunc_quit_wm(struct client_ctx *cc, void *arg)
+{
+ int p;
+ p = kill(getpid(),SIGTERM);
+ warn("p");
+}
Index: conf.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/conf.c,v
retrieving revision 1.23
diff -u -r1.23 conf.c
--- conf.c 23 Mar 2008 15:09:21 -0000 1.23
+++ conf.c 4 Apr 2008 20:01:40 -0000
@@ -94,7 +94,7 @@
conf_bindname(c, "CM-Return", "terminal");
conf_bindname(c, "CM-Delete", "lock");
conf_bindname(c, "M-question", "exec");
- conf_bindname(c, "CM-q", "exec_wm");
+ conf_bindname(c, "CM-p", "exec_wm");
conf_bindname(c, "M-period", "ssh");
conf_bindname(c, "M-Return", "hide");
conf_bindname(c, "M-Down", "lower");
@@ -119,6 +119,7 @@
conf_bindname(c, "M-Left", "prevgroup");
conf_bindname(c, "CM-f", "maximize");
conf_bindname(c, "CM-equal", "vmaximize");
+ conf_bindname(c, "CM-q", "quit");
conf_bindname(c, "M-h", "moveleft");
conf_bindname(c, "M-j", "movedown");
@@ -260,6 +261,7 @@
{ "prevgroup", kbfunc_client_prevgroup, 0, 0 },
{ "maximize", kbfunc_client_maximize, KBFLAG_NEEDCLIENT, 0 },
{ "vmaximize", kbfunc_client_vmaximize, KBFLAG_NEEDCLIENT, 0 },
+ { "quit", kbfunc_quit_wm, 0, 0 },
{ "exec", kbfunc_exec, 0, (void *)CWM_EXEC_PROGRAM },
{ "exec_wm", kbfunc_exec, 0, (void *)CWM_EXEC_WM },
{ "ssh", kbfunc_ssh, 0, 0 },
Index: calmwm.h
===================================================================
RCS file: /cvs/xenocara/app/cwm/calmwm.h,v
retrieving revision 1.26
diff -u -r1.26 calmwm.h
--- calmwm.h 26 Mar 2008 15:45:42 -0000 1.26
+++ calmwm.h 4 Apr 2008 20:02:07 -0000
@@ -451,6 +451,7 @@
void kbfunc_client_nogroup(struct client_ctx *, void *);
void kbfunc_client_maximize(struct client_ctx *, void *);
void kbfunc_client_vmaximize(struct client_ctx *, void *);
+void kbfunc_quit_wm(struct client_ctx *, void *);
void kbfunc_client_move(struct client_ctx *, void *);
void kbfunc_client_resize(struct client_ctx *, void *);
void kbfunc_menu_search(struct client_ctx *, void *);
Index: cwm.1
===================================================================
RCS file: /cvs/xenocara/app/cwm/cwm.1,v
retrieving revision 1.24
diff -u -r1.24 cwm.1
--- cwm.1 23 Mar 2008 15:09:21 -0000 1.24
+++ cwm.1 4 Apr 2008 20:02:36 -0000
@@ -61,6 +61,8 @@
Spawn a new terminal.
.It Ic C-M-Delete
Lock the screen.
+.It Ic C-M-q
+Quit cwm.
.It Ic M-Enter
Hide current window.
.It Ic M-Down
@@ -104,7 +106,7 @@
to provide host auto-completion.
.Xr ssh 1
will be executed via the configured terminal emulator.
-.It Ic C-M-q
+.It Ic C-M-p
Spawn
.Dq Exec WindowManager
dialog; allows you to switch from