diff --git a/PKGBUILD b/PKGBUILD index 420f92c..ba092b1 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -29,6 +29,7 @@ _patches=( "dwm-alpha-20201019-61bb8b2.diff" "dwm-statuscmd-signal-6.2.diff" "local-xrdb-6.2.diff" + "local-sticky-20160911-ab9571b.diff" ) source=(http://dl.suckless.org/dwm/dwm-$pkgver.tar.gz @@ -52,7 +53,8 @@ md5sums=('9929845ccdec4d2cc191f16210dd7f3d' 'cdf4c9dacfecd8f3aecb5fc8166c4604' '7799f60a9e87e4f99e813d158abee15b' '6343099cdc9752bc3f4f87e119345b79' - '62e3374566c0519000da48e2bec988d8') + '3ebe2a57a05e963764c2083916a02677' + '1494ebf7135e01101542daa59b7b28ab') prepare() { cd $srcdir/dwm-$pkgver diff --git a/README.org b/README.org index f9b0d61..0344ad5 100644 --- a/README.org +++ b/README.org @@ -16,6 +16,7 @@ - [[https://dwm.suckless.org/patches/selfrestart/][selfrestart]] - [[https://dwm.suckless.org/patches/statuscmd/][statuscmd]] - [[https://dwm.suckless.org/patches/statuspadding/][statuspadding]] +- [[https://dwm.suckless.org/patches/sticky/][sticky]] - [[https://dwm.suckless.org/patches/uselessgap/][uselessgap]] - [[https://dwm.suckless.org/patches/xrdb/][xrdb]] diff --git a/config_desktop.h b/config_desktop.h index 646d35a..5dc5b7e 100644 --- a/config_desktop.h +++ b/config_desktop.h @@ -129,6 +129,7 @@ static Key keys[] = { { MODKEY|ControlMask, XK_period, cyclelayout, {.i = +1 } }, { MODKEY, XK_p, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_s, togglesticky, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, diff --git a/local-sticky-20160911-ab9571b.diff b/local-sticky-20160911-ab9571b.diff new file mode 100644 index 0000000..d2f589a --- /dev/null +++ b/local-sticky-20160911-ab9571b.diff @@ -0,0 +1,55 @@ +diff -up -N a/config.def.h b/config.def.h +--- a/config.def.h 2020-12-03 11:29:07.728007732 +0100 ++++ b/config.def.h 2020-12-03 11:29:46.061416879 +0100 +@@ -104,6 +104,7 @@ static Key keys[] = { + { MODKEY|ControlMask, XK_period, cyclelayout, {.i = +1 } }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, ++ { MODKEY, XK_s, togglesticky, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + { MODKEY, XK_comma, focusmon, {.i = -1 } }, +diff -up -N a/dwm.c b/dwm.c +--- a/dwm.c 2020-12-03 11:29:07.728007732 +0100 ++++ b/dwm.c 2020-12-03 11:31:14.767443065 +0100 +@@ -51,7 +51,7 @@ + #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) + #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ + * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) +-#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) ++#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]) || C->issticky) + #define LENGTH(X) (sizeof X / sizeof X[0]) + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) + #define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx) +@@ -111,7 +111,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, issticky; + Client *next; + Client *snext; + Monitor *mon; +@@ -239,6 +239,7 @@ static void tagmon(const Arg *arg); + static void tile(Monitor *); + static void togglebar(const Arg *arg); + static void togglefloating(const Arg *arg); ++static void togglesticky(const Arg *arg); + static void togglescratch(const Arg *arg); + static void toggletag(const Arg *arg); + static void toggleview(const Arg *arg); +@@ -2070,6 +2071,14 @@ togglescratch(const Arg *arg) + spawn(arg); + } + ++togglesticky(const Arg *arg) ++{ ++ if (!selmon->sel) ++ return; ++ selmon->sel->issticky = !selmon->sel->issticky; ++ arrange(selmon); ++} ++ + void + toggletag(const Arg *arg) + { diff --git a/local-xrdb-6.2.diff b/local-xrdb-6.2.diff index 9614fe0..c17d12b 100644 --- a/local-xrdb-6.2.diff +++ b/local-xrdb-6.2.diff @@ -79,7 +79,6 @@ diff -up -N a/drw.h b/drw.h /* Cursor abstraction */ Cur *drw_cur_create(Drw *drw, int shape); -Binary files a/dwm and b/dwm differ diff -up -N a/dwm.c b/dwm.c --- a/dwm.c 2020-12-03 09:59:28.269999652 +0100 +++ b/dwm.c 2020-12-03 10:07:29.821925745 +0100 @@ -194,4 +193,3 @@ diff -up -N a/dwm.c b/dwm.c setup(); #ifdef __OpenBSD__ if (pledge("stdio rpath proc exec", NULL) == -1) -Binary files a/dwm.o and b/dwm.o differ