r/suckless • • 24d ago

[PATCH] Can anyone create a dwm patch?

I wanted to mimic the behaviour of the attach aside and below patch as it wasn't working as intended even after successfully patching dwm 6.8 but the patch I created also didn't work so i was hoping that someone on this subreddit could help me out

i specifically want the ability to preserve the master client such that it doesn't go to the slave area at all

2 Upvotes

7 comments sorted by

2

u/bakkeby 24d ago

attachaside, attachbottom and attachbelow should all leave the master client alone, assuming that you have a master and client split.

The way you word it makes it sound like you should never be able to zoom a client, or perform any action that may affect the master client(s), like making it floating or moving it to another tag or monitor.

There are other solutions like a rotatestack that leaves the master clients alone, for example. Just figure out how you want it to behave first, then it is less guesswork to write a patch for it.

2

u/Gloomy-Donut70 24d ago

when i use attach aside on spawning the third client the master client goes to the slave stack and the 2nd client becomes the new master i don't want that behaviour i want the master client to stay as is and the 3rd client to be attached below the 2nd client

1

u/bakkeby 24d ago

For the new client to end up below the 2nd client you'd just need the attachbottom patch.

The intent of the attachaside patch is to attach new clients right after the first visible tiled client, so the master client stays in place, and the new client becomes the second tiled client, and what was the second tiled client becomes the third tiled client.

What you just described is that on spawning the third client the first and second tiled clients swap places, and the new client is added as the third tiled client. I doubt that is what is going on. If testing using terminals you can type in the client number on the command prompt (1, 2, 3, etc.) which will make it easier to see where they end up.

Minor note. The attachaside patch does not, however, take nmaster into account, so if you have two clients in the master area then the next client will end up as the second client in the master area, rather than the first client in the stack area.

1

u/Gloomy-Donut70 23d ago

Thanks alot for the explanation

4

u/girlboss_failson 24d ago

If you have a basic grasp of the C language, sure.

If you don't, you can learn

2

u/destructuringbind 24d ago

Ask any AI. (Reddit is only for moaning about AI these days, if you want to do something you have to talk to AI)

0

u/sucklessuser 20d ago

What exactly do you want lol