You are not logged in.
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:
Last edited by oldgaro (2017-09-24 05:45:27)
GNU - Dwm - St - Screen - Zsh - SpacEmacs - Neovim
Github
Offline
this is a hacking, not a general support, thread.
And the error message is pretty self-evident. Read `man patch`.
Offline
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
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
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
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
I see, now it works. Thanks.
Offline
hello guy !
I recently switch from i3 to dwm, everything is pretty cool
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
Linux User #499032
Offline
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
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
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
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
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
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
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
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.
Offline
Does the latest one on suckless.org not apply?
https://dwm.suckless.org/patches/status … 9c870.diff
Offline
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.
Offline
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
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
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
Offline
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
How about
$ dwm -q
Is it achievable?
Offline
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
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