diff --git a/src/config.c b/src/config.c index 147f139..c71d1b6 100644 --- a/src/config.c +++ b/src/config.c @@ -55,6 +55,7 @@ conf_init_func_list(void) {"set_nmaster", uicb_set_nmaster }, {"quit", uicb_quit }, {"toggle_infobar_position", uicb_infobar_togglepos }, + {"toggle_resizehint", uicb_toggle_resizehint }, {"mouse_move", uicb_mouse_move }, {"mouse_resize", uicb_mouse_resize }, {"client_raise", uicb_client_raise }, diff --git a/src/layout.c b/src/layout.c index 525ddb0..e55cbb8 100644 --- a/src/layout.c +++ b/src/layout.c @@ -513,6 +513,19 @@ uicb_togglemax(uicb_t cmd) return; } +/** Toggle the resizehint + * \param cmd uicb_t type + */ +void +uicb_toggle_resizehint(uicb_t cmd) +{ + tags[selscreen][seltag[selscreen]].resizehint = !tags[selscreen][seltag[selscreen]].resizehint; + + tags[selscreen][seltag[selscreen]].layout.func(selscreen); + + return; +} + /** Set the layout * \param cmd uicb_t type */ diff --git a/src/wmfs.h b/src/wmfs.h index 3620896..c2881f9 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -276,6 +276,7 @@ void uicb_layout_next(uicb_t); void uicb_set_mwfact(uicb_t); void uicb_set_nmaster(uicb_t); void uicb_set_layout(uicb_t); +void uicb_toggle_resizehint(uicb_t); /* init.c */ void init(void); diff --git a/wmfsrc b/wmfsrc index 3d620e5..68b8f92 100644 --- a/wmfsrc +++ b/wmfsrc @@ -178,6 +178,9 @@ keys # Toggle the position of the infobar. key { mod = {"Alt"} key = "b" func = "toggle_infobar_position" } + # Toggle the resizehint of the current tag/screen + key { mod = { "Shift", "Control" } key = "r" func = "toggle_resizehint" } + # Select the next client. key { mod = {"Alt"} key = "Tab" func = "client_next" }