extend floating mode keybinds
This commit is contained in:
parent
20b83d151b
commit
adcb8fc79e
|
@ -81,6 +81,7 @@
|
||||||
- Super+Control+Shift+n | Connect to wifi (Requires iwd)
|
- Super+Control+Shift+n | Connect to wifi (Requires iwd)
|
||||||
- Super+Control+Shift+b | Connect to a bluetooth device (Requires bluez and bluez-utils)
|
- Super+Control+Shift+b | Connect to a bluetooth device (Requires bluez and bluez-utils)
|
||||||
- Super+Control+Shift+e | Open up a list of dotfiles in dmenu that you can edit.
|
- Super+Control+Shift+e | Open up a list of dotfiles in dmenu that you can edit.
|
||||||
|
- Alt+Super+Up/Down | Resize the window keeping the aspect ratio of it.
|
||||||
- Alt+Tab | Switch windows quickly and easily
|
- Alt+Tab | Switch windows quickly and easily
|
||||||
- Alt+Control+j/k | Change window size vertically (cfact)
|
- Alt+Control+j/k | Change window size vertically (cfact)
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,8 @@ static const Key keys[] = {
|
||||||
{ MODIFIER1|ShiftMask, -1, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
|
{ MODIFIER1|ShiftMask, -1, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
|
||||||
{ MODIFIER1|ShiftMask, -1, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
|
{ MODIFIER1|ShiftMask, -1, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
|
||||||
{ MODIFIER1|ShiftMask, -1, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
|
{ MODIFIER1|ShiftMask, -1, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
|
||||||
|
{ MODIFIER2|ShiftMask, -1, XK_Down, moveresizeaspect, {.i = +24} },
|
||||||
|
{ MODIFIER2|ShiftMask, -1, XK_Up, moveresizeaspect, {.i = -24} },
|
||||||
{ MODIFIER1|ControlMask, -1, XK_Up, moveresizeedge, {.v = "t"} },
|
{ MODIFIER1|ControlMask, -1, XK_Up, moveresizeedge, {.v = "t"} },
|
||||||
{ MODIFIER1|ControlMask, -1, XK_Down, moveresizeedge, {.v = "b"} },
|
{ MODIFIER1|ControlMask, -1, XK_Down, moveresizeedge, {.v = "b"} },
|
||||||
{ MODIFIER1|ControlMask, -1, XK_Left, moveresizeedge, {.v = "l"} },
|
{ MODIFIER1|ControlMask, -1, XK_Left, moveresizeedge, {.v = "l"} },
|
||||||
|
|
24
speedwm.c
24
speedwm.c
|
@ -302,6 +302,7 @@ static void setnumdesktops(void);
|
||||||
static void setviewport(void);
|
static void setviewport(void);
|
||||||
static void arrange(Monitor *m);
|
static void arrange(Monitor *m);
|
||||||
static void arrangemon(Monitor *m);
|
static void arrangemon(Monitor *m);
|
||||||
|
static void moveresizeaspect(const Arg *arg);
|
||||||
static void attach(Client *c);
|
static void attach(Client *c);
|
||||||
static void attachabove(Client *c);
|
static void attachabove(Client *c);
|
||||||
static void attachaside(Client *c);
|
static void attachaside(Client *c);
|
||||||
|
@ -865,6 +866,29 @@ arrangemon(Monitor *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
moveresizeaspect(const Arg *arg) {
|
||||||
|
Client *c;
|
||||||
|
c = selmon->sel;
|
||||||
|
float ratio;
|
||||||
|
int w, h,nw, nh;
|
||||||
|
|
||||||
|
if (!c || !arg)
|
||||||
|
return;
|
||||||
|
if (selmon->lt[selmon->sellt]->arrange && !c->isfloating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ratio = (float)c->w / (float)c->h;
|
||||||
|
h = arg->i;
|
||||||
|
w = (int)(ratio * h);
|
||||||
|
|
||||||
|
nw = c->w + w;
|
||||||
|
nh = c->h + h;
|
||||||
|
|
||||||
|
XRaiseWindow(dpy, c->win);
|
||||||
|
resize(c, c->x, c->y, nw, nh, True);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
attach(Client *c)
|
attach(Client *c)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue