mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
commit
f27195491c
@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2020-06-19 - Added tagothermonitor patch
|
||||
|
||||
2020-06-15 - Added sizehints patch
|
||||
|
||||
2020-06-14 - Added RULE macro to replace rules setup making the default config less of an abomination and making it simpler to include new rules based patches
|
||||
|
11
config.def.h
11
config.def.h
@ -511,6 +511,10 @@ static Signal signals[] = {
|
||||
#if XRDB_PATCH && !VTCOLORS_PATCH
|
||||
{ "xrdb", xrdb },
|
||||
#endif // XRDB_PATCH
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
{ "tagnextmonex", tagnextmonex },
|
||||
{ "tagprevmonex", tagprevmonex },
|
||||
#endif // TAGOTHERMONITOR_PATCH
|
||||
{ "quit", quit },
|
||||
{ "setlayout", setlayout },
|
||||
{ "setlayoutex", setlayoutex },
|
||||
@ -683,6 +687,13 @@ static const Layout layouts[] = {
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||
#endif // COMBO_PATCH / SWAPTAGS_PATCH
|
||||
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
/* TODO: Choose keybindings for TAGOTHERMONITOR_PATCH
|
||||
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|Mod4Mask|ShiftMask, KEY, tagprevmon, {.ui = 1 << TAG} }, \
|
||||
*/
|
||||
#endif // TAGOTHERMONITOR_PATCH
|
||||
|
||||
#if STACKER_PATCH
|
||||
#define STACKKEYS(MOD,ACTION) \
|
||||
{ MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
|
||||
|
16
patch/dwmc.c
16
patch/dwmc.c
@ -40,6 +40,20 @@ tagallex(const Arg *arg)
|
||||
tag(&((Arg){.ui = ~0}));
|
||||
}
|
||||
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
void
|
||||
tagnextmonex(const Arg *arg)
|
||||
{
|
||||
tagnextmon(&((Arg) { .ui = 1 << arg->ui }));
|
||||
}
|
||||
|
||||
void
|
||||
tagprevmonex(const Arg *arg)
|
||||
{
|
||||
tagprevmon(&((Arg) { .ui = 1 << arg->ui }));
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
fake_signal(void)
|
||||
{
|
||||
@ -81,4 +95,4 @@ fake_signal(void)
|
||||
|
||||
// No fake signal was sent, so proceed with update
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,8 @@ static void toggleviewex(const Arg *arg);
|
||||
static void tagex(const Arg *arg);
|
||||
static void toggletagex(const Arg *arg);
|
||||
static void tagallex(const Arg *arg);
|
||||
static int fake_signal(void);
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
static void tagnextmonex(const Arg *arg);
|
||||
static void tagprevmonex(const Arg *arg);
|
||||
#endif
|
||||
static int fake_signal(void);
|
||||
|
@ -164,6 +164,9 @@
|
||||
#if TAGGRID_PATCH
|
||||
#include "taggrid.c"
|
||||
#endif
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
#include "tagothermonitor.c"
|
||||
#endif
|
||||
#if TAGSWAPMON_PATCH
|
||||
#include "tagswapmon.c"
|
||||
#endif
|
||||
@ -245,4 +248,4 @@
|
||||
#endif
|
||||
#if TILE_LAYOUT
|
||||
#include "tile.c"
|
||||
#endif
|
||||
#endif
|
||||
|
@ -164,6 +164,9 @@
|
||||
#if TAGGRID_PATCH
|
||||
#include "taggrid.h"
|
||||
#endif
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
#include "tagothermonitor.h"
|
||||
#endif
|
||||
#if TAGSWAPMON_PATCH
|
||||
#include "tagswapmon.h"
|
||||
#endif
|
||||
@ -239,4 +242,4 @@
|
||||
#endif
|
||||
#if TILE_LAYOUT
|
||||
#include "tile.h"
|
||||
#endif
|
||||
#endif
|
||||
|
29
patch/tagothermonitor.c
Normal file
29
patch/tagothermonitor.c
Normal file
@ -0,0 +1,29 @@
|
||||
void
|
||||
tagnextmon(const Arg *arg)
|
||||
{
|
||||
tagothermon(arg, 1);
|
||||
}
|
||||
|
||||
void
|
||||
tagprevmon(const Arg *arg)
|
||||
{
|
||||
tagothermon(arg, -1);
|
||||
}
|
||||
|
||||
void
|
||||
tagothermon(const Arg *arg, int dir)
|
||||
{
|
||||
Client *sel;
|
||||
Monitor *newmon;
|
||||
|
||||
if (!selmon->sel || !mons->next)
|
||||
return;
|
||||
sel = selmon->sel;
|
||||
newmon = dirtomon(dir);
|
||||
sendmon(sel, newmon);
|
||||
if (arg->ui & TAGMASK) {
|
||||
sel->tags = arg->ui & TAGMASK;
|
||||
focus(NULL);
|
||||
arrange(newmon);
|
||||
}
|
||||
}
|
3
patch/tagothermonitor.h
Normal file
3
patch/tagothermonitor.h
Normal file
@ -0,0 +1,3 @@
|
||||
static void tagnextmon(const Arg *arg);
|
||||
static void tagprevmon(const Arg *arg);
|
||||
static void tagothermon(const Arg *arg, int dir);
|
@ -681,6 +681,12 @@
|
||||
*/
|
||||
#define TAGMONFIXFS_PATCH 0
|
||||
|
||||
/* Add functions and keybindings to tag a window to a desired tag on the next (right)
|
||||
* or previous (left) monitor from the currently selected monitor.
|
||||
* https://dwm.suckless.org/patches/tagothermonitor/
|
||||
*/
|
||||
#define TAGOTHERMONITOR_PATCH 0
|
||||
|
||||
/* This patch allows you to swap all visible windows on one monitor with those of an
|
||||
* adjacent monitor.
|
||||
* https://github.com/bakkeby/patches/tree/master/dwm/dwm-tagswapmon-6.2.diff
|
||||
|
Loading…
Reference in New Issue
Block a user