mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding killunsel patch
This commit is contained in:
parent
a8049d86bb
commit
b6928ab1fb
@ -13,6 +13,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2019-10-05 - Added killunsel patch
|
||||
|
||||
2019-10-04 - Added maximize, movestack, monoclesymbol, noborder, tagall and tagintostack patches
|
||||
|
||||
2019-10-03 - Added onlyquitonempty and switchcol patches
|
||||
@ -222,6 +224,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
- [unfloatvisible](https://dwm.suckless.org/patches/unfloatvisible/)
|
||||
- resets isfloating on any visible windows that have it set and optionally also applies a layout
|
||||
|
||||
- [killunsel](https://dwm.suckless.org/patches/killunsel/)
|
||||
- kills all visible clients that are not selected (only the selected client will remain)
|
||||
|
||||
- [urgentborder](https://dwm.suckless.org/patches/urgentborder/)
|
||||
- this patch makes "urgent" windows have different colors
|
||||
|
||||
|
@ -364,6 +364,9 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_z, showhideclient, {0} },
|
||||
#endif // AWESOMEBAR_PATCH
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
#if KILLUNSEL_PATCH
|
||||
{ MODKEY|ShiftMask, XK_x, killunsel, {0} },
|
||||
#endif // KILLUNSEL_PATCH
|
||||
#if SELFRESTART_PATCH
|
||||
{ MODKEY|ShiftMask, XK_r, self_restart, {0} },
|
||||
#endif // SELFRESTART_PATCH
|
||||
|
@ -52,6 +52,10 @@
|
||||
#include "holdbar.c"
|
||||
#endif
|
||||
|
||||
#if KILLUNSEL_PATCH
|
||||
#include "killunsel.c"
|
||||
#endif
|
||||
|
||||
#if MAXIMIZE_PATCH
|
||||
#include "maximize.c"
|
||||
#endif
|
||||
|
@ -52,6 +52,10 @@
|
||||
#include "holdbar.h"
|
||||
#endif
|
||||
|
||||
#if KILLUNSEL_PATCH
|
||||
#include "killunsel.h"
|
||||
#endif
|
||||
|
||||
#if MAXIMIZE_PATCH
|
||||
#include "maximize.h"
|
||||
#endif
|
||||
|
22
patch/killunsel.c
Normal file
22
patch/killunsel.c
Normal file
@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
patch/killunsel.h
Normal file
1
patch/killunsel.h
Normal file
@ -0,0 +1 @@
|
||||
static void killunsel(const Arg *arg);
|
@ -175,6 +175,11 @@
|
||||
*/
|
||||
#define HOLDBAR_PATCH 0
|
||||
|
||||
/* This patch adds a keybinding to kills all visible clients that are not selected.
|
||||
* https://dwm.suckless.org/patches/killunsel/
|
||||
*/
|
||||
#define KILLUNSEL_PATCH 0
|
||||
|
||||
/* Moves the layout symbol in the status bar to the left hand side.
|
||||
* http://dwm.suckless.org/patches/leftlayout/
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user