diff options
| author | bakkeby <[email protected]> | 2020-08-10 12:32:58 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-08-10 13:16:12 +0200 |
| commit | 1dd4ec5bc436f89496b344264cf8ee1da67e5ded (patch) | |
| tree | 626e2e3bba3d16fbd179462a0d53eca1b3d2f038 /patch | |
| parent | e5ea493d3299caad340ecbd6ef7a6fd563224f43 (diff) | |
| download | dwm-flexipatch-1dd4ec5bc436f89496b344264cf8ee1da67e5ded.tar.gz dwm-flexipatch-1dd4ec5bc436f89496b344264cf8ee1da67e5ded.zip | |
Adding insets patch
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/include.c | 3 | ||||
| -rw-r--r-- | patch/include.h | 3 | ||||
| -rw-r--r-- | patch/insets.c | 18 | ||||
| -rw-r--r-- | patch/insets.h | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/patch/include.c b/patch/include.c index aaaf123..81901a1 100644 --- a/patch/include.c +++ b/patch/include.c @@ -111,6 +111,9 @@ #if INPLACEROTATE_PATCH #include "inplacerotate.c" #endif +#if INSETS_PATCH +#include "insets.c" +#endif #if KEYMODES_PATCH #include "keymodes.c" #endif diff --git a/patch/include.h b/patch/include.h index e879d80..a556964 100644 --- a/patch/include.h +++ b/patch/include.h @@ -111,6 +111,9 @@ #if INPLACEROTATE_PATCH #include "inplacerotate.h" #endif +#if INSETS_PATCH +#include "insets.h" +#endif #if KEYMODES_PATCH #include "keymodes.h" #endif diff --git a/patch/insets.c b/patch/insets.c new file mode 100644 index 0000000..c0836cf --- /dev/null +++ b/patch/insets.c @@ -0,0 +1,18 @@ +void +setinset(Monitor *m, Inset inset) +{ + Bar *bar; + m->inset = inset; + updatebarpos(m); + for (bar = m->bar; bar; bar = bar->next) + XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh); + arrange(m); +} + +void +updateinset(const Arg *arg) +{ + Inset *inset = (Inset *)arg->v; + for (Monitor *m = mons; m; m = m->next) + setinset(m, *inset); +}
\ No newline at end of file diff --git a/patch/insets.h b/patch/insets.h new file mode 100644 index 0000000..ab76278 --- /dev/null +++ b/patch/insets.h @@ -0,0 +1,2 @@ +static void setinset(Monitor *m, Inset inset); +static void updateinset(const Arg *arg);
\ No newline at end of file |
