chore: better keybinds?

This commit is contained in:
Arthur Khachaturov 2024-08-01 02:07:04 +03:00
parent 4607399dc8
commit 931c3c105c
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
2 changed files with 23 additions and 22 deletions

9
dwm.c
View file

@ -205,6 +205,7 @@ static void maprequest(XEvent *e);
static void monocle(Monitor *m);
static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg);
static void movemetaws(const Arg *arg);
static Client *nexttiled(Client *c);
static void pop(Client *c);
static void propertynotify(XEvent *e);
@ -1311,6 +1312,13 @@ motionnotify(XEvent *e)
mon = m;
}
void
movemetaws(const Arg *arg)
{
const Arg a = {.i = (metaws + arg->i + LENGTH(metaworkspaces)) % LENGTH(metaworkspaces)};
tagmetaws(&a);
}
void
movemouse(const Arg *arg)
{
@ -1931,6 +1939,7 @@ tagmetaws(const Arg *arg)
selmon->sel->tags[i] = 0;
selmon->sel->tags[arg->i] = ot;
}
focus(NULL);
arrange(selmon);
}