origin)
This commit is contained in:
speedie 2022-12-07 19:27:50 +01:00
parent b2d20dc7a5
commit b53f805dee
3 changed files with 9 additions and 0 deletions

View file

@ -31,6 +31,7 @@ These keybinds are for navigating speedwm
- Super+Enter - Switch order of windows
- Super+Colon - Open a list of desktop entries in dmenu
- Super+Tab - Switch between windows on the same tag. (Microsoft Windows-like Alt+Tab)
- Super+v - Center the focused window.
- Super+0 - Reset mfact
- Super+r - Reset number of masters
- Super+y - Make the current selected window sticky

View file

@ -135,6 +135,7 @@ static Key keys[] = {
{ MODIFIER1|CONTROL|SHIFT, -1, XK_minus, setbarheight, {.i = -1} },
{ MODIFIER1, -1, XK_period, setbarpadding, {.i = +1 } },
{ MODIFIER1, -1, XK_comma, setbarpadding, {.i = -1 } },
{ MODIFIER1, -1, XK_v, centerwindow, {0} },
{ MODIFIER1|SHIFT, -1, XK_period, setbpgaps, {.i = +1 } },
{ MODIFIER1|SHIFT, -1, XK_comma, setbpgaps, {.i = -1 } },
{ MODIFIER1|CONTROL, -1, XK_i, incstackcount, {.i = +1 } },

View file

@ -742,6 +742,8 @@ static void takepreview(void);
/* We will keep this one, in order to keep keybinds.h clean. */
static void previewtag(const Arg *arg);
static void centerwindow(const Arg *arg);
#include "bar/items.h"
/* switcher funcs */
@ -6655,6 +6657,11 @@ previewtag(const Arg *arg)
#endif
}
void
centerwindow(const Arg *arg)
{
resizeclient(selmon->sel, (selmon->mw - selmon->mw * 0.5) / 2, (selmon->mh - selmon->mh * 0.5) / 2, selmon->mw * 0.5, selmon->mh * 0.5);
}
/* Layout code */
#include "layouts.c" /* Enable patched layouts */