Workspace styled movement
Mod+Left/Right/Up/Down für Fokus zwischen Workspaces und Clients
This commit is contained in:
@@ -329,6 +329,8 @@ static void setmon(Client *c, Monitor *m, uint32_t newtags);
|
||||
static void setpsel(struct wl_listener *listener, void *data);
|
||||
static void setsel(struct wl_listener *listener, void *data);
|
||||
static void setup(void);
|
||||
static void shiftclient(const Arg *arg);
|
||||
static void shiftview(const Arg *arg);
|
||||
static void spawn(const Arg *arg);
|
||||
static void startdrag(struct wl_listener *listener, void *data);
|
||||
static void tag(const Arg *arg);
|
||||
@@ -2709,6 +2711,34 @@ tagmon(const Arg *arg)
|
||||
setmon(sel, dirtomon(arg->i), 0);
|
||||
}
|
||||
|
||||
void
|
||||
shiftview(const Arg *arg)
|
||||
{
|
||||
Arg a;
|
||||
unsigned int tagmask = selmon->tagset[selmon->seltags];
|
||||
if (arg->i > 0)
|
||||
a.ui = (tagmask == (1u << (TAGCOUNT - 1))) ? 1 : tagmask << 1;
|
||||
else
|
||||
a.ui = (tagmask == 1) ? (1u << (TAGCOUNT - 1)) : tagmask >> 1;
|
||||
view(&a);
|
||||
}
|
||||
|
||||
void
|
||||
shiftclient(const Arg *arg)
|
||||
{
|
||||
Client *sel = focustop(selmon);
|
||||
Arg a;
|
||||
unsigned int tagmask = selmon->tagset[selmon->seltags];
|
||||
if (!sel)
|
||||
return;
|
||||
if (arg->i > 0)
|
||||
a.ui = (tagmask == (1u << (TAGCOUNT - 1))) ? 1 : tagmask << 1;
|
||||
else
|
||||
a.ui = (tagmask == 1) ? (1u << (TAGCOUNT - 1)) : tagmask >> 1;
|
||||
sel->tags = a.ui;
|
||||
view(&a);
|
||||
}
|
||||
|
||||
void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user