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"),
|
||||
|
|
14
layout.c
14
layout.c
|
@ -166,14 +166,14 @@ uicb_setlayout(Display *disp,
|
|||
int i;
|
||||
Client *c;
|
||||
|
||||
for(i = 0; i < awesomeconf->nlayouts && &awesomeconf->layouts[i] != awesomeconf->current_layout; i++);
|
||||
|
||||
if(!arg)
|
||||
i++;
|
||||
else
|
||||
if(arg)
|
||||
{
|
||||
for(i = 0; i < awesomeconf->nlayouts && &awesomeconf->layouts[i] != awesomeconf->current_layout; i++);
|
||||
i = compute_new_value_from_arg(arg, (double) i);
|
||||
|
||||
if(i < 0 || i >= awesomeconf->nlayouts)
|
||||
if(i < 0 || i >= awesomeconf->nlayouts)
|
||||
i = 0;
|
||||
}
|
||||
else
|
||||
i = 0;
|
||||
|
||||
awesomeconf->current_layout = &awesomeconf->layouts[i];
|
||||
|
|
Loading…
Reference in New Issue