add new keybind

This commit is contained in:
speediegq 2022-08-26 19:12:10 +02:00
parent d19f44bf92
commit ef1e8970ea
4 changed files with 26 additions and 2 deletions

View file

@ -97,6 +97,7 @@
- Super+Shift+e+a | Open the virtual keyboard
- Super+Shift+e+e | Open a list of all emojis and copy the selection
- Super+Shift+e+a | Open a list of copypasta and copy the selection
- Alt+Shift+q+o | Kill every window except the focused
-- Extras --

View file

@ -1,2 +0,0 @@
- Fix j focus not.. doing that (likely another awesomebar thing)
- Possibly round corners around tag previews and maybe bar (idea)

View file

@ -142,6 +142,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_e, XK_a, spawn, SHCMD("speedwm-virtualkeyboard") },
{ MODKEY|ShiftMask, XK_e, XK_e, spawn, SHCMD("speedwm-virtualkeyboard -e") },
{ MODKEY|ShiftMask, XK_e, XK_c, spawn, SHCMD("speedwm-virtualkeyboard -c") },
{ SMODKEY|ShiftMask, XK_q, XK_o, killunsel, {0} },
/* Gap keybinds */
{ MODKEY|SMODKEY, -1, XK_j, incrgaps, {.i = +1 } },

View file

@ -329,6 +329,7 @@ static int handlexevent(struct epoll_event *ev);
static void keypress(XEvent *e);
static int fake_signal(void);
static void killclient(const Arg *arg);
static void killunsel(const Arg *arg);
static void layoutmenu(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa);
static void managealtbar(Window win, XWindowAttributes *wa);
@ -2498,6 +2499,29 @@ killclient(const Arg *arg)
}
}
void
killunsel(const Arg *arg)
{
Client *i = NULL;
if (!selmon->sel)
return;
for (i = selmon->clients; i; i = i->next) {
if (ISVISIBLE(i) && i != selmon->sel) {
if (!sendevent(i, wmatom[WMDelete])) {
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
XKillClient(dpy, i->win);
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);
}
}
}
}
void
manage(Window w, XWindowAttributes *wa)
{