You are not logged in.

#1 2013-10-21 02:52:03

pythonscript
Member
From: Edinburgh, Scotland
Registered: 2009-07-10
Posts: 68

[solved] Why doesn't the bottom stack patch appear in dwm ...

I downloaded the newest version of the patch from here (http://dwm.suckless.org/patches/bottom_stack) and merged it with my copy of the dwm source:

wget http://dwm.suckless.org/patches/dwm-6.0-bstack.diff
git apply dwm-6.0-bstack.diff
cat config.def.h > config.h
git add -p config.h # Commit only the patch's changes that don't override my other tweaks
git commit
git checkout -- config.h # Discard the remaining changes to config.h, which are those that override custom tweaks
make

The changes are merged successfully into dwm and the build executes successfully, but after restarting X, the modes aren't there. Clicking on the mode button only shows Tile ("[]=") and Floating ("><>").

Did I apply the patch incorrectly, or what?

The only part of the config.h file I changed is this:

#include "bstack.c"
#include "bstackhoriz.c"
static const Layout layouts[] = {
	/* symbol     arrange function */
	{ "[]=",      tile },    /* first entry is default */
	{ "><>",      NULL },    /* no layout function means floating behavior */
	{ "[M]",      monocle },
	{ "TTT",      bstack },
	{ "===",      bstackhoriz },
};

Last edited by pythonscript (2013-10-24 03:22:31)


Lenovo SL510 Thinkpad / Asus EEEPC 1005HA
No hables a menos que puedas mejorar el silencio. - Neruda
La sabiduría nos llega cuando ya no nos sirve de nada. - Márquez

Offline

#2 2013-10-21 04:10:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,432

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

How did you install dwm?
I note you did not do a make install   (Note, I do not recommend this), so which executable do you think you are running?

I think you will find that the files installed by dwm ( pacman -Ql dwm ) are older than versions you just compiled.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#3 2013-10-21 04:19:05

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,126

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

git add -p config.h # Commit the patch's changes that don't override my other tweaks

This doesn't make sense. The patch applied everything to your working dir which is what you're building from, right? If so, all of your "other tweaks" are already overridden. If you're not building in the working dir, you added the changes but didn't commit them, so the patch wasn't applied in source control at all.

Offline

#4 2013-10-21 11:19:53

pythonscript
Member
From: Edinburgh, Scotland
Registered: 2009-07-10
Posts: 68

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

ewaller wrote:

How did you install dwm?
I note you did not do a make install   (Note, I do not recommend this), so which executable do you think you are running?

I think you will find that the files installed by dwm ( pacman -Ql dwm ) are older than versions you just compiled.

My build directory is ~/build/dwm, and I have a symbolic link in ~/bin that points to the resulting executable in ~/build/dwm. I download the latest version using git clone and built those sources.

Scimmia wrote:

git add -p config.h # Commit the patch's changes that don't override my other tweaks

This doesn't make sense. The patch applied everything to your working dir which is what you're building from, right? If so, all of your "other tweaks" are already overridden. If you're not building in the working dir, you added the changes but didn't commit them, so the patch wasn't applied in source control at all.

Sorry, I forgot one step. After committing only changes to config.h that added the features of bottom stack, I ran "git checkout -- config.h" to discard the remaining changes, which are those that overwrote my other tweaks.

The patch a) created bstack.c and bstackhoriz.c, and b) created a config file in config.def.h (and therefore didn't overwrite my custom config.h). After writing the new config.def.h to my config.h, I staged the changes  in chunks. Any chunks that added changes from config.def.h, e.g. the addition of

#include "bstack.c"
#include "bstackhoriz.c"

to config.h, I kept. Any changes that *deleted* my custom changes, e.g. removing my tag rules, because these are present in config.h but not config.def.h, I ignored and reversed with the git checkout command Looking at my config.h file, my other tweaks are still there, as are the changes for the bstack patch. I then built this version.


Lenovo SL510 Thinkpad / Asus EEEPC 1005HA
No hables a menos que puedas mejorar el silencio. - Neruda
La sabiduría nos llega cuando ya no nos sirve de nada. - Márquez

Offline

#5 2013-10-23 02:09:39

pythonscript
Member
From: Edinburgh, Scotland
Registered: 2009-07-10
Posts: 68

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

This might be a stupid question, but do I need to insert additional keybindings into my config.h to get the bottom stack patch to work?


Lenovo SL510 Thinkpad / Asus EEEPC 1005HA
No hables a menos que puedas mejorar el silencio. - Neruda
La sabiduría nos llega cuando ya no nos sirve de nada. - Márquez

Offline

#6 2013-10-23 02:14:55

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,364
Website

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

Yes: for setlayout.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#7 2013-10-24 03:21:58

pythonscript
Member
From: Edinburgh, Scotland
Registered: 2009-07-10
Posts: 68

Re: [solved] Why doesn't the bottom stack patch appear in dwm ...

jasonwryan wrote:

Yes: for setlayout.

Awesome, I can't believe I didn't realize that. Thanks for the help. Patch works great now.

Last edited by pythonscript (2013-10-24 03:22:10)


Lenovo SL510 Thinkpad / Asus EEEPC 1005HA
No hables a menos que puedas mejorar el silencio. - Neruda
La sabiduría nos llega cuando ya no nos sirve de nada. - Márquez

Offline

Board footer

Powered by FluxBB