Add "expose" feature ala mac OS X to display all client of a screen
Feature #100 requested by shibo
This commit is contained in:
parent
5ece3a6e55
commit
41c4570dcf
@ -98,6 +98,7 @@ const func_name_list_t func_list[] =
|
||||
{"clientlist", uicb_clientlist },
|
||||
{"check_clist", uicb_checkclist },
|
||||
{"toggle_tagautohide", uicb_toggle_tagautohide },
|
||||
{"toggle_tag_expose", uicb_tag_toggle_expose},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@ -501,6 +502,8 @@ conf_tag_section(void)
|
||||
conf.border.tag = fetch_opt_first(sec, "false", "border").bool;
|
||||
conf.tagautohide = fetch_opt_first(sec, "false", "autohide").bool;
|
||||
conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").bool;
|
||||
conf.tag_expose_name = fetch_opt_first(sec, "EXPOSE", "expose_name").str;
|
||||
conf.expose_layout = fetch_opt_first(sec, "tile_grid_vertical", "expose_layout").str;
|
||||
|
||||
def_tag = fetch_section_first(sec, "default_tag");
|
||||
|
||||
|
||||
@ -499,6 +499,8 @@ typedef struct
|
||||
Bool layout_system; /* Switch: False, Menu: True. */
|
||||
Bool layout_placement; /* Right (normal): False, Left: True. */
|
||||
Bool keep_layout_geo;
|
||||
char *tag_expose_name;
|
||||
char *expose_layout;
|
||||
char *selected_layout_symbol;
|
||||
/* Number of... */
|
||||
int nkeybind;
|
||||
|
||||
40
src/tag.c
40
src/tag.c
@ -734,3 +734,43 @@ uicb_tag_rename(uicb_t cmd)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
uicb_tag_toggle_expose(uicb_t cmd)
|
||||
{
|
||||
(void)cmd;
|
||||
int i;
|
||||
|
||||
screen_get_sel();
|
||||
|
||||
for(i = 1; i <= conf.ntag[selscreen]; i++)
|
||||
{
|
||||
if(strcmp(tags[selscreen][i].name, conf.tag_expose_name) == 0)
|
||||
{
|
||||
tag_set(sel->tag);
|
||||
arrange(selscreen, True);
|
||||
tag_delete(selscreen, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
tag_new(selscreen, conf.tag_expose_name);
|
||||
|
||||
for(i = 0; i < conf.nlayout; ++i)
|
||||
{
|
||||
if(strcmp(conf.expose_layout, conf.layout[i].type) == 0)
|
||||
{
|
||||
tags[selscreen][conf.ntag[selscreen]].layout = conf.layout[i];
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 1; i < conf.ntag[selscreen]; ++i)
|
||||
{
|
||||
tags[selscreen][conf.ntag[selscreen]].tagad ^= TagFlag(i);
|
||||
}
|
||||
|
||||
arrange(selscreen, True);
|
||||
tags[selscreen][conf.ntag[selscreen]].request_update = True;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -300,6 +300,7 @@ void uicb_tag_del(uicb_t);
|
||||
void uicb_tag_rename(uicb_t cmd);
|
||||
void uicb_tag_last(uicb_t cmd);
|
||||
void uicb_tag_stay_last(uicb_t cmd);
|
||||
void uicb_tag_toggle_expose(uicb_t cmd);
|
||||
|
||||
/* screen.c */
|
||||
int screen_count(void);
|
||||
|
||||
5
wmfsrc
5
wmfsrc
@ -124,6 +124,9 @@
|
||||
#default_name = "new tag" # deprecated, use [default_tag] instead
|
||||
#default_layout = "tile_right" # deprecated, use [default_tag] instead
|
||||
|
||||
expose_name = "EXPOSE"
|
||||
expose_layout = "tile_left"
|
||||
|
||||
# Border around the tag buttons.
|
||||
border = true
|
||||
|
||||
@ -431,6 +434,8 @@
|
||||
[key] mod = {"Super", "Shift"} key = "a" func = "client_screen_next" [/key]
|
||||
[key] mod = {"Super", "Shift"} key = "z" func = "client_screen_prev" [/key]
|
||||
|
||||
[key] mod = {"Alt"} key = "e" func = "toggle_tag_expose" [/key]
|
||||
|
||||
# unlisted fonctions that can be used in [key] func = ""
|
||||
# client_focus_{right, left, top, bottom}
|
||||
# client_ignore_tag # Toggle the client in ignore_tag (display the client on all tags)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user