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: 30,424
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  •   Surfraw

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: 21

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: 171

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: 30,330
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: 171

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: 2

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

#1535 2018-09-29 09:10:43

ubone
Member
Registered: 2014-08-31
Posts: 47

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

simple world clock and battery, add $(date +'%a %-d %b %H:%M') somewhere in there

#!/usr/bin/dash
while
if [ "$(cat /sys/class/power_supply/C1F4/status)" = "Discharging" ]; then
	xsetroot -name "$(cat /sys/class/power_supply/C1F4/capacity)% | $(TZ=America/Los_Angeles date +'%H %Z') | $(TZ=America/New_York date +'%H %Z') | $(TZ=UTC date +'%H %Z') | $(TZ=Europe/London date +'%H %Z') | $(TZ=Europe/Berlin date +'%H %Z') | $(TZ=Asia/Hong_Kong date +'%H %Z') | $(TZ=Asia/Tokyo date +'%H %Z') | $(TZ=Australia/Sydney date +'%H %Z')"
else
	xsetroot -name "$(TZ=America/Los_Angeles date +'%H %Z') | $(TZ=America/New_York date +'%H %Z') | $(TZ=UTC date +'%H %Z') | $(TZ=Europe/London date +'%H %Z') | $(TZ=Europe/Berlin date +'%H %Z') | $(TZ=Asia/Hong_Kong date +'%H %Z') | $(TZ=Asia/Tokyo date +'%H %Z') | $(TZ=Australia/Sydney date +'%H %Z')"
fi
do sleep 1m
done

Offline

#1536 2018-09-29 14:32:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

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

FWIW the following two lines are equivalent, but the second a bit shorted and a bit more efficient:

if [ "$(cat /sys/class/power_supply/C1F4/status)" = "Discharging" ]; then

if grep -qF Discharging /sys/class/power_supply/C1F4/status; then

But far better than either of those for efficiency:

read status < /sys/class/power_supply/C1F4/status
if [ "$status" = Discharging ]; then

You could also apply the same to capacity and only have one xsetroot line:

if [ "$status" = Discharging ]; then
   read capacity < /sys/class/whatever
   capacity="$capacity% | "
else
   capacity=
fi
xsetroot -name "$capacity$(TZ=... date ..."

Last edited by Trilby (2018-09-29 14:38:54)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#1537 2018-10-08 08:30:23

nggit
Member
Registered: 2018-10-08
Posts: 1
Website

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

fancybarclickable patch is still unclean. People are lazy? I tried to clean it myself. Succeed.. but i don't like it. It's too fancy. So I did a few modifications. If anyone needs it: https://github.com/nggit/dwm-fancybarclickable-6.1

Offline

#1538 2019-02-24 17:25:27

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

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

Do any of you running DWM know where I might find clean updated patches for attachabove or attachbelow for version 6.2?

I've tried for days now to update the 6.1 patches on the DWM's website, but have only received additional errors after correcting errors when trying to get them to build properly.  Updated patches seem to be quite slow appearing on the DWM website, and my web searches have yielded no updates.  Thanks in advance to anyone that may be able to help with this matter.


oz

Offline

#1539 2019-02-24 17:50:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,277
Website

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

ozar wrote:

Do any of you running DWM know where I might find clean updated patches for attachabove or attachbelow for version 6.2?

I've just built the latest dwm version with the 6.1 patch for attachbottom and had no problems; the 2018-01-26 patch for attachabove also built successfully (but the 6.1 patch wouldn't apply cleanly). I don't use Xinerama though, nor have I tested if the patches actually work as intended (I run my dwm with attachaside so I'm not installing the other versions).

Perhaps if you post your attempts and the resulting errors then we might be able to help more. EDIT: in a separate support thread would be best, I think.

Last edited by Head_on_a_Stick (2019-02-24 17:52:46)


Para todos todo, para nosotros nada

Offline

#1540 2019-02-24 22:55:42

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

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

Thanks for the quick reply.  I was apparently going about it in the wrong way, so knowing the 6.1 patch worked for you, I tried it again in a different way and it worked.  I had it working once before a few days back, but DWM would freeze after a while and I'd have to reboot.  It all went differently this time and I believe will continue to work properly.  Thanks again for your time and thoughts on this issue.


oz

Offline

#1541 2019-03-14 06:08:25

acidvegas
Member
From: Olympia, Greece
Registered: 2016-11-09
Posts: 5
Website

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

Does anyone have a working statuscolors patch for the latest dwm-6.2?

Also looking for a patch to fullscreen single windows in a tag while using tilegaps patch so that when only one window is opened there is no useless gaps around it.


MOST DANGEROUS MOTHERFUCK
GithubSuperNETs

Offline

#1542 2019-03-14 07:20:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

Does the latest one on suckless.org not apply?
https://dwm.suckless.org/patches/status … 9c870.diff


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#1543 2019-03-15 05:57:23

acidvegas
Member
From: Olympia, Greece
Registered: 2016-11-09
Posts: 5
Website

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

jasonwryan wrote:

Does the latest one on suckless.org not apply?
https://dwm.suckless.org/patches/status … 9c870.diff

i tried using that one. the patch applies but it is buggy. every time \x03TEXT\x01 is used, it adds random padding to the right as seen below:
https://i.imgur.com/8Z3ZUvt.png

my slstatus config.h

const unsigned int interval = 1000;
static const char unknown_str[] = "??";

#define MAXLEN 2048

static const struct arg args[] = {
    { cpu_perc,     "\x03Ç\x01 %s% │ ",     NULL},
    { ram_perc,     "\x03Æ\x01 %s% │ ",     NULL},
    { disk_perc,    "\x03¨\x01 %s% │ ",     "/"},
    { temp,         "\x03±\x01 %s°C │ ",    "/sys/class/thermal/thermal_zone0/temp"},
    { battery_perc, "\x03ð\x01 %s% │ ",     "BAT0"},
    { vol_perc,     "\x03í\x01 %s% │ ",     "/dev/dsp"},
    { datetime,     "\x03ú\x01 %s",         "%m/%d │ · %I:%M" },
};

my dwm config.h (these are the only lines related to the statuscolors patch)

static const char *colors[][3]     = {
    [SchemeNorm]   = { "#FFFFFF", "#000000", "#444444" },
    [SchemeSel]    = { "#00D787", "#000000", "#00D787" },
    [SchemeWarn]   = { "#00D787", "#000000", "#000000" },
    [SchemeUrgent] = { "#00D787", "#000000", "#000000" },
};

the only other patch i am using with this is https://dwm.suckless.org/patches/tilegap/ but i do not think tilegap is causing the issue. ive usedtilegap without statuscolors patch and this didnt happen.


MOST DANGEROUS MOTHERFUCK
GithubSuperNETs

Offline

#1544 2019-05-08 06:28:44

LindyBalboa
Member
Registered: 2016-10-06
Posts: 39

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

Hi, I am playing around with DWM and would like to ask if a patch exists for i3 like modes or xmonad like submasks? With either you can press say ctrl+o and have an 'Open' subset where 'f' can be mapped to firefox, 's' to spotify, etc...

Offline

#1545 2019-08-14 16:28:26

fake_larry
Member
Registered: 2019-08-14
Posts: 1

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

LindyBalboa wrote:

Hi, I am playing around with DWM and would like to ask if a patch exists for i3 like modes or xmonad like submasks? With either you can press say ctrl+o and have an 'Open' subset where 'f' can be mapped to firefox, 's' to spotify, etc...

I made a branch with that functionality a week ago. Go ahead and check it out on https://gitea.com/fake_larry/dwm/commit … .2/keymode.

I've not written any documentation yet, but there is an example in config.def.h.

To get the patch file:

$ git clone https://gitea.com/fake_larry/dwm dwm
$ cd dwm
$ git format-patch 6.2..patch/6.2/keymode --stdout > keymode.patch

Offline

#1546 2019-12-04 08:39:52

zanculmarktum
Member
Registered: 2016-09-25
Posts: 10

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

can anyone make a patch that disables Mod+Shift+Q and makes dwm can only be quit via terminal, e.g.

$ dwm -q

?
I sometimes forgot that the keybind to close a window is Mod+Shift+C and used Mod+Shift+Q instead, which quit in turn quit the entire dwm big_smile

Offline

#1547 2019-12-04 12:48:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

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

No "patch" is needed for that.  You set your own keybindings in config.h at compile time.  Just delete the last line (currently line 96) of the key bindings.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#1548 2019-12-05 17:13:29

zanculmarktum
Member
Registered: 2016-09-25
Posts: 10

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

How about

$ dwm -q

Is it achievable?

Offline

#1549 2019-12-05 21:10:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

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

Oh, sorry, I missed that you wanted to add that (I was thinking there was some default for that that i never used).  How about just `killall dwm`?  Or similarly, `killall xinit` (or startx depending on which you use).  Or you could just use a different key binding that you're less likely to hit by accident.

It'd be hard to get `dwm -q` to do what you want as it'd require builing in IPC mechanisms that dwm doesn't currently use.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#1550 2019-12-05 23:45:15

zanculmarktum
Member
Registered: 2016-09-25
Posts: 10

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

It'd be hard to get `dwm -q` to do what you want as it'd require builing in IPC mechanisms that dwm doesn't currently use.

You're right, a quick read from dwm.c shows that `quick` function simply sets a variable `running` to 0

void
quit(const Arg *arg)
{
	running = 0;
}

How about having `dwm -q` creating a file called ~/.dwm/quit to give dwm a signal to quit? Can you please do that?

Offline

Board footer

Powered by FluxBB