mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Change 'menu-window' to display all windows; then add 'menu-window-hidden' for
the previous behaviour of 'menu-window'. 'menu-window' becomes the default binding; use 'bind-mouse "1" menu-window-hidden' to restore old behaviour for those who prefer. OK sthen@ (long long time ago on a different version)
This commit is contained in:
parent
d968a6c1bf
commit
92111e526d
2
calmwm.h
2
calmwm.h
@ -261,6 +261,8 @@ enum menu_exec {
|
|||||||
#define CWM_MENU_DUMMY 0x0001
|
#define CWM_MENU_DUMMY 0x0001
|
||||||
#define CWM_MENU_FILE 0x0002
|
#define CWM_MENU_FILE 0x0002
|
||||||
#define CWM_MENU_LIST 0x0004
|
#define CWM_MENU_LIST 0x0004
|
||||||
|
#define CWM_MENU_WINDOW_ALL 0x0008
|
||||||
|
#define CWM_MENU_WINDOW_HIDDEN 0x0010
|
||||||
|
|
||||||
struct menu {
|
struct menu {
|
||||||
TAILQ_ENTRY(menu) entry;
|
TAILQ_ENTRY(menu) entry;
|
||||||
|
5
conf.c
5
conf.c
@ -174,7 +174,10 @@ static const struct {
|
|||||||
{ "menu-cmd", kbfunc_menu_cmd, CWM_CONTEXT_SC, {0} },
|
{ "menu-cmd", kbfunc_menu_cmd, CWM_CONTEXT_SC, {0} },
|
||||||
{ "menu-group", kbfunc_menu_group, CWM_CONTEXT_SC, {0} },
|
{ "menu-group", kbfunc_menu_group, CWM_CONTEXT_SC, {0} },
|
||||||
{ "menu-ssh", kbfunc_menu_ssh, CWM_CONTEXT_SC, {0} },
|
{ "menu-ssh", kbfunc_menu_ssh, CWM_CONTEXT_SC, {0} },
|
||||||
{ "menu-window", kbfunc_menu_client, CWM_CONTEXT_SC, {0} },
|
{ "menu-window", kbfunc_menu_client, CWM_CONTEXT_SC,
|
||||||
|
{.i = CWM_MENU_WINDOW_ALL} },
|
||||||
|
{ "menu-window-hidden", kbfunc_menu_client, CWM_CONTEXT_SC,
|
||||||
|
{.i = CWM_MENU_WINDOW_HIDDEN} },
|
||||||
{ "menu-exec", kbfunc_menu_exec, CWM_CONTEXT_SC,
|
{ "menu-exec", kbfunc_menu_exec, CWM_CONTEXT_SC,
|
||||||
{.i = CWM_MENU_EXEC_EXEC} },
|
{.i = CWM_MENU_EXEC_EXEC} },
|
||||||
{ "menu-exec-wm", kbfunc_menu_exec, CWM_CONTEXT_SC,
|
{ "menu-exec-wm", kbfunc_menu_exec, CWM_CONTEXT_SC,
|
||||||
|
4
cwm.1
4
cwm.1
@ -219,8 +219,8 @@ Menus are recalled by clicking the mouse on the root window:
|
|||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width Ds -offset indent -compact
|
.Bl -tag -width Ds -offset indent -compact
|
||||||
.It Ic M1
|
.It Ic M1
|
||||||
Show list of currently hidden windows.
|
Show list of currently defined windows.
|
||||||
Selecting an item will unhide that window.
|
Selecting an item will warp to that window, unhiding it if necessary.
|
||||||
.It Ic M2
|
.It Ic M2
|
||||||
Show list of currently defined groups.
|
Show list of currently defined groups.
|
||||||
Selecting an item will hide/unhide that group.
|
Selecting an item will hide/unhide that group.
|
||||||
|
2
cwmrc.5
2
cwmrc.5
@ -261,6 +261,8 @@ Spawn a new terminal.
|
|||||||
Lock the screen.
|
Lock the screen.
|
||||||
.It menu-window
|
.It menu-window
|
||||||
Launch window search menu.
|
Launch window search menu.
|
||||||
|
.It menu-window-hidden
|
||||||
|
Launch hidden window search menu.
|
||||||
.It menu-cmd
|
.It menu-cmd
|
||||||
Launch application search menu.
|
Launch application search menu.
|
||||||
.It menu-group
|
.It menu-group
|
||||||
|
3
kbfunc.c
3
kbfunc.c
@ -298,12 +298,13 @@ kbfunc_menu_client(void *ctx, union arg *arg, enum xev xev)
|
|||||||
struct menu *mi;
|
struct menu *mi;
|
||||||
struct menu_q menuq;
|
struct menu_q menuq;
|
||||||
int m = (xev == CWM_XEV_BTN);
|
int m = (xev == CWM_XEV_BTN);
|
||||||
|
int all = (arg->i & CWM_MENU_WINDOW_ALL);
|
||||||
|
|
||||||
old_cc = client_current();
|
old_cc = client_current();
|
||||||
|
|
||||||
TAILQ_INIT(&menuq);
|
TAILQ_INIT(&menuq);
|
||||||
TAILQ_FOREACH(cc, &sc->clientq, entry) {
|
TAILQ_FOREACH(cc, &sc->clientq, entry) {
|
||||||
if (m) {
|
if (!all) {
|
||||||
if (cc->flags & CLIENT_HIDDEN)
|
if (cc->flags & CLIENT_HIDDEN)
|
||||||
menuq_add(&menuq, cc, NULL);
|
menuq_add(&menuq, cc, NULL);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user