Applying Patches To Suckless Software

preview_player
Показать описание
I had a viewer ask me about patching Suckless software (like dwm, st and dmenu). I have done videos on this in the past but it has been awhile. And I noticed that my dmenu build is not up-to-date, so I'm killing two birds with one stone here.

NOTE:
If you want my dmenu build, go to my GitLab and "git clone" the dmenu-distrotube repo. Then run "sudo make install". For those of you on Arch, you can "yay dmenu-distrotube-git".

REFERENCED:

WANT TO SUPPORT THE CHANNEL?

SOCIAL PLATFORMS:
💬 IRC: irc://freenode #distrotube

DT ON THE WEB:

FREE AND OPEN SOURCE SOFTWARE THAT I USE:

Your support is very much appreciated. Thanks, guys!
Рекомендации по теме
Комментарии
Автор

Perfect, right when I was considering installing DWM.

btwiusearch
Автор

Oh hell yeah you are absofuckinlutely awesome, I can't say thank you enough for taking the time to do this video. I've already watched it 4 times to make sure I understood what I'm doing. I don't know if you get enough credit for taking the time to do what you do, but I will say thank you got taking the time to make this hat's off to you!!!

Chinmoku_No_Te
Автор

Just got dwm yesterday and this is very timely . Thanks DT!

UnderTheTutelage
Автор

Hi dt, I do in a little different way, All the patch will be created from latest master branch of dmenu. We can do all this stuff using git. I mean clone the dmenu repository. You will get a master branch. Create a new branch from master. Apply your patch in it. If you want to apply another, create another branch from master and do the next patch in it. And later create a release branch from master. Merge both the patch branch to release branch. Delete all patch branch keep only release branch. Tomorrow if you get a new update from dmenu. Pull from master remote to local. Repeat again. You can create a simple script if you like it.

VipinBalakrishnan
Автор

This is such a cool system for adding functionality to a program. I'm going to seriously look into more of the suckless projects.

r.f.mineguy
Автор

I love compiling software. That's why i use dwm in gentoo.

PetrosSharp
Автор

I find it helpful to do builds for each patch that I apply just so I know which diff I messed up

jaydlc
Автор

Well the right way to patch is to create a clean branch, then from that create a new branch out to each patch you want to apply. Then after all patches are applied to a clean build. You create a new branch, called E.g develop, then from that you start merging all the patches. Then you will not have as much problem as you had now. Use the power of git and branches to your advantages.

knutien
Автор

I recently updated my st build because I threw away nano and started learning vim, which I had trouble using with st. It turns out st earlier this year released an update where they finally make the backspace and delete keys work in a default build so you no longer need to grab a patch for that, and I think that by itself justifies covering st in the near future. So I downloaded that newer version, grabbed my few usual patches (except the aforementioned one with BS/DEL because that's default now) added my few tweaks and now vim is working great.

albynoson
Автор

I dont know what the best way to patch suckless tools are, but what is better than this is to use branches and rebasing.
So instead of manually applying patches on top of each other on the same branch and fixing conflicts yourself, you would offload most of that effort onto git.
For the script to work, you need to have created a branch named as the user and cd into the project directory.

What's great about this is that you can create multiple branches each containing 1 patch then decide to apply whichever combination of patches by rebasing the wanted branches onto the user branch

jansenmtan
Автор

I have seen your second patching mistake in main as you were making it. It happens to the best of us. Glad to see you doing suckless stuff. Please do review of some dwm and st patches.

oalfodr
Автор


He has made using Suckless tools very easy, he has included all the patch that are available for DWM, Dmenu, ST and so on, and made a preprocessor, a header file basically that you can edit to check what patches you wanna include in your build plus he has his own patches too, like a patch that can give you powerline for statusbar, have rules for setting up default different layout for different tags and so on, and then `make` you build with that, and use finalizer tool to cleanup the unneeded code from the source code.

I highly encourage you DT and everyone else to check the project out.

BTW the real Suckless way to apply a patch is to do it manually. : ]

apoorv
Автор

ببخشید سوال شاید خنده اور باشد اما میخاستم بپرسم ایا این ترمینل در linux سرور ميباشد .
يعني شما در linux server dmenu دانلود كرديد.

janatjanat
Автор

Why don't any of you (people that make patching suckless software videos) use git? There are a few advantages like easier conflict resolution, less failed hunks (in my experience) + if you feel like you fucked up somewhere along the way you can time travel back to the commit you want and not reapplying patches from scratch.


When I have a branch for each feature I want, I just create a new branch from master like `my_dwm` and then just merge the feature branches to it. In my experience there are less conflicts when merging with `git` compared to using `patch`, and even when you get a confict you only need to open one file and you'll see the lines in question there directly.

You can also experiment with patches and rolling back the merges you don't want. Ability to have 2 builds in one repo (my_dwm_desktop, my_dwm_laptop) is also something you can do if you want to have separete builds for each of your machines.

If you anyone reading this has any suggestions for improving this flow, plz let me know.

klimenkodr
Автор

The blinky light rig on the left makes me think DJ WOPR lol

odinseye-yk
Автор

Hi DT! I was wondering if you plan on covering berrywm? It seems like a pretty cool project

hisbaan
Автор

You repeated the mistake of the center-patch with the fuzzymatch-patch and then later corrected it in the wrong way: You added an additional "fast = 1" where it should have been "fuzzy = 0".

Thanks for the video, I am always looking forward to your content. :) I could see myself doing this for dmenu, and maybe one more piece of software, but overall the patching seems too tedious and error-prone to keep more than that up-to-date. Do you do this patching process for other things as well?

thEClawtcl
Автор

What about --merge option when patching??

carlosllaque
Автор

We would like to see more of the suckless tools videos

zedrobot
Автор

It's pretty cool to see the recommendations you have and which patches are worth using. Do you have a similar video already on st? Typically these suckless programs just have so many patches nowadays, and many of the patches kind of have insufficient description.

coppereva
welcome to shbcf.ru