Merge branch 'bacardi55' of github.com:xorg62/wmfs into bacardi55

This commit is contained in:
Raphael Khaiat 2011-01-26 13:37:21 +01:00
commit 2e4c8bd202
6 changed files with 29 additions and 2 deletions

View File

@ -75,6 +75,7 @@ const func_name_list_t func_list[] =
{"set_nmaster", uicb_set_nmaster },
{"quit", uicb_quit },
{"toggle_infobar_position", uicb_infobar_togglepos },
{"toggle_infobar_display", uicb_infobar_toggledisplay },
{"toggle_resizehint", uicb_toggle_resizehint },
{"mouse_move", uicb_mouse_move },
{"mouse_resize", uicb_mouse_resize },
@ -512,7 +513,7 @@ conf_tag_section(void)
fetch_opt_first(def_tag, "0.6", "mwfact").fnum,
fetch_opt_first(def_tag, "1", "nmaster").num,
False, fetch_opt_first(def_tag, "False", "resizehint").bool,
False, False, bar_pos,
False, False, bar_pos, bar_pos,
layout_name_to_struct(conf.layout, fetch_opt_first(def_tag, "title_right", "layout").str, conf.nlayout, layout_list),
0, NULL, 0, False };

View File

@ -403,6 +403,29 @@ uicb_infobar_togglepos(uicb_t cmd)
return;
}
/** Toggle hide/display infobar
* \param cmd uicb_t type unused
*/
void
uicb_infobar_toggledisplay(uicb_t cmd)
{
(void)cmd;
screen_get_sel();
int new_pos;
new_pos = (tags[selscreen][seltag[selscreen]].barpos
? 0 : (tags[selscreen][seltag[selscreen]].prev_barpos
? tags[selscreen][seltag[selscreen]].prev_barpos : 2
));
tags[selscreen][seltag[selscreen]].prev_barpos = tags[selscreen][seltag[selscreen]].barpos;
tags[selscreen][seltag[selscreen]].barpos = new_pos;
infobar_set_position(new_pos);
return;
}
/** Toggle the tag_autohide mode
* \param cmd uicb_t type unused
*/

View File

@ -286,6 +286,7 @@ typedef struct
Bool request_update;
Bool abovefc;
int barpos;
int prev_barpos;
Layout layout;
uint tagad;
MouseBinding *mouse;

View File

@ -585,7 +585,7 @@ tag_new(int s, char *name)
Tag t = { displayedName, NULL, 0, 0,
conf.default_tag.mwfact, conf.default_tag.nmaster,
False, conf.default_tag.resizehint, False, False,
conf.default_tag.barpos, conf.default_tag.layout,
conf.default_tag.barpos, conf.default_tag.barpos, conf.default_tag.layout,
0, NULL, 0, False };
tags[s][conf.ntag[s]] = t;

View File

@ -154,6 +154,7 @@ void infobar_update_taglist(int sc);
void infobar_destroy(void);
void infobar_set_position(int pos);
void uicb_infobar_togglepos(uicb_t);
void uicb_infobar_toggledisplay(uicb_t);
void uicb_toggle_tagautohide(uicb_t);
/* client.c */

1
wmfsrc
View File

@ -317,6 +317,7 @@
# Toggle the position of the infobar.
[key] mod = {"Alt"} key = "b" func = "toggle_infobar_position" [/key]
[key] mod = {"Alt", "Shift"} key = "b" func = "toggle_infobar_display" [/key]
# Toggle the resizehint of the current tag/screen
[key] mod = {"Shift", "Control"} key = "r" func = "toggle_resizehint" [/key]