change behaviour of uicb_setlayout: no arg now reset to first/default layout ; add bindings in default config
This commit is contained in:
parent
4c4fb83e81
commit
d76902653a
|
@ -66,7 +66,8 @@ awesome:
|
|||
|
||||
# Keys binding
|
||||
keys = ((("Mod4"), "Return", "spawn", "exec xterm"),
|
||||
(("Mod4"), "space", "setlayout"),
|
||||
(("Mod4"), "space", "setlayout", "+1"),
|
||||
(("Mod4", "Shift"), "space", "setlayout", "-1"),
|
||||
(("Mod4"), "b", "togglebar"),
|
||||
(("Mod4"), "j", "focusnext"),
|
||||
(("Mod4"), "k", "focusprev"),
|
||||
|
|
10
layout.c
10
layout.c
|
@ -166,15 +166,15 @@ uicb_setlayout(Display *disp,
|
|||
int i;
|
||||
Client *c;
|
||||
|
||||
if(arg)
|
||||
{
|
||||
for(i = 0; i < awesomeconf->nlayouts && &awesomeconf->layouts[i] != awesomeconf->current_layout; i++);
|
||||
|
||||
if(!arg)
|
||||
i++;
|
||||
else
|
||||
i = compute_new_value_from_arg(arg, (double) i);
|
||||
|
||||
if(i < 0 || i >= awesomeconf->nlayouts)
|
||||
i = 0;
|
||||
}
|
||||
else
|
||||
i = 0;
|
||||
|
||||
awesomeconf->current_layout = &awesomeconf->layouts[i];
|
||||
|
||||
|
|
Loading…
Reference in New Issue