mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-04 04:20:24 -04:00
add setlayout function
This commit is contained in:
parent
fdbe9ee29a
commit
def3572117
2 changed files with 13 additions and 0 deletions
11
dwl.c
11
dwl.c
|
@ -143,6 +143,7 @@ static void resize(Client *c, int x, int y, int w, int h);
|
|||
static void resizemouse(const Arg *arg);
|
||||
static void run(char *startup_cmd);
|
||||
static void setcursor(struct wl_listener *listener, void *data);
|
||||
static void setlayout(const Arg *arg);
|
||||
static void setup(void);
|
||||
static void spawn(const Arg *arg);
|
||||
static void tile(Monitor *m);
|
||||
|
@ -885,6 +886,16 @@ setcursor(struct wl_listener *listener, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
setlayout(const Arg *arg)
|
||||
{
|
||||
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
|
||||
selmon->sellt ^= 1;
|
||||
if (arg && arg->v)
|
||||
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
||||
/* XXX change layout symbol? */
|
||||
}
|
||||
|
||||
void
|
||||
setup(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue