You are not logged in.

#1526 2017-09-24 05:42:48

oldgaro
Member
From: Brazil
Registered: 2017-09-19
Posts: 9
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

I cant apply a patch that I made(diff -up)

But when applying the patch it says:

can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- config.def_original.h      2015-11-08 20:39:37.000000000 -0200
|+++ config.def.h       2017-09-24 00:36:20.329877587 -0300
--------------------------
File to patch:

https://suckless.org/hacking

Last edited by oldgaro (2017-09-24 05:45:27)


GNU - Dwm - St - Screen - Zsh - SpacEmacs - Neovim
Github

Offline

#1527 2017-09-24 05:46:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,747
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

jasonwryan wrote:

this is a hacking, not a general support, thread.

And the error message is pretty self-evident. Read `man patch`.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#1528 2017-09-24 06:28:54

oldgaro
Member
From: Brazil
Registered: 2017-09-19
Posts: 9
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Oh, I see now! a relative path to the config.def.h fixes it!

--- config.def.h	2015-11-08 20:39:37.000000000 -0200
+++ ../config.def.h	2017-09-24 00:36:20.329877587 -0300

GNU - Dwm - St - Screen - Zsh - SpacEmacs - Neovim
Github

Offline

#1529 2017-10-17 10:01:28

qurn
Member
Registered: 2017-10-13
Posts: 2

Re: DWM Hackers Unite! Share (or request) dwm patches.

here are my 2 patches for dwm
https://github.com/qurn/dwm-patches

4statusevents
Splits CltStatusText into 4. So you can have different actions for clicks on different locations in the statusbar. E.g. open a Calendar or pavucontrol etc. This patch is very simple. The positions of ClkStatusText1 to Clk..4 are defined in the config.h in pixels from the right.

If this is already done (better) by a patch inform me. The seperation could be done similar to the statuscolors patch. But it already works for me and im quite happy with the little code. Im just throwing the idea in the room.

noNET_SUPPORTING_WM_CHECK
This patch just reverts commit e63bf229485a576d68975dd4eb00c210394133ae from dwm 2016-12-05. With it fullscreen videos in firefox fill the tile and not the screen, like it was before that date.

Maybe this can be done better, as i have no idea what the code actually does. I only don't want this effect of it. Additionally would like to have this behaviour for all programms e.g. vlc and chromium. Does anyone know how to achieve this?
Edit: I figured it out. Added a new smaller patch.
fulltile
Fullscreen just fills the tile

Last edited by qurn (2017-10-17 13:49:04)

Offline

#1530 2018-02-17 03:07:57

olocin
Member
Registered: 2018-01-03
Posts: 69

Re: DWM Hackers Unite! Share (or request) dwm patches.

I have the following lines in my dwm config.h

static const char *maim[]  = { "maim", "-s", "~/Pictures/$(date +%s).png", NULL };
...
	{ MODKEY,                       XK_Insert, spawn,          {.v = maim } },

upon pressing alt+insert I get the plus-shaped pointer, but when I release the button after shaping the part I want to capture, nothing happens, namely I can find no file in the above folder. The same command works from the terminal. What am I missing?

Offline

#1531 2018-02-17 03:16:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,976
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

olocin wrote:

namely I can find no file in the above folder. The same command works from the terminal. What am I missing?

What folder would that be.  That command would (attempt to) create a file in whatever the current working directory was with the literal string "~/Pictures/$(date +%s).png" as the file name: neither the tilde nor the subshell would be expanded.  `spawn` is not parsed by a shell, that is what SHCMD is for.

Last edited by Trilby (2018-02-17 03:17:43)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#1532 2018-02-17 03:41:48

olocin
Member
Registered: 2018-01-03
Posts: 69

Re: DWM Hackers Unite! Share (or request) dwm patches.

I see, now it works. Thanks.

Offline

#1533 2018-04-24 09:27:02

drakfire
Member
From: France
Registered: 2010-03-21
Posts: 12

Re: DWM Hackers Unite! Share (or request) dwm patches.

hello guy !

I recently switch from i3 to dwm, everything is pretty cool wink

I use dwm 6.1 with systray, hide vacant tags, push, savefloats and uselessgap patchs, I have 2 monitors and, if i understand dwm use 2 tagset by defaults. I would like the first monitor is tagset 1 and the second is 2 etc ... At this time the first monitor is 1 and the second is 1 too.

Is that patch would be ok for my need ? dwm-single_tagset-6.1 ?

thanks wink


Linux User #499032

Offline

#1534 2018-09-11 19:18:43

laine
Member
Registered: 2018-09-11
Posts: 1

Re: DWM Hackers Unite! Share (or request) dwm patches.

yellohh,
I've been trying to find the code that is responsible for drawing the squares in the tags, which show which tags are visible, but so far no luck.
This is a bit of a long shot but has anyone ever come across this code?

edit: found it! pretty sure no one is ever gonna need this but just in case: how to turn the squares in the tags into triangles

drw.c

drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
{
	XPoint points[] = {
		{x, y},
		{x+w, y},
		{x, y+h},
		{x, y}
	};

	int npoints = sizeof(points)/sizeof(XPoint);

	if (!drw || !drw->scheme)
		return;
	XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);

	if (filled)
		XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
	else
		XDrawLines(drw->dpy, drw->drawable, drw->gc, points, npoints, CoordModeOrigin);
}

Last edited by laine (2018-09-11 21:55:04)

Offline

Board footer

Powered by FluxBB