VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Applying Patches To Suckless Software DistroTube

Applying Patches To Suckless Software DistroTube

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Applying Patches To Suckless Software DistroTube 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. - https://suckless.org/ - Suckless - https://gitlab.com/dwt1/dmenu-distrotube - DT's dmenu build
Date: 2022-03-30

Comments and reviews: 10


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.
reply

Instead of opening up another terminal, going to that directory, and then opening vim in it, I'd recommend just opening a new pane in vim.
:sb would split the current buffer
:e edits a file
so doing -:sb -e dmenu.c- would open a buffer and edit dmenu.c. Then you can navigate between the panes with -h,j,k,l- (most people remap to be those).
I was patching a newer version of st last night, and got into the routine of just doing -vim -p -.rej- to open each reject file in its own vim tab, and then I'd just go through the tabs, splitting the buffers and doing the edits, then running -rm -.rej- after all that before moving on.

reply

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.
reply

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?

reply

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.
reply

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.
reply

When doing all this patchwork, think about using quilt to manage the patch stack.
BTW: Why are you opening two terminal windows with vim when you might as well use a vsplit in one vim instance?

reply

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.
reply

Would you make a video on how to patch suckless software or install software from github on NixOS?
I tried NixOs after your last video, but have not found a viable solution yet.

reply

Yo dt I recently installed dwm and dmenu for the first time and I can't wrap my head around the dmenu-xyw patch, if I try to put some flags dmenu doesn't start
reply
Add a review, comment






Other channel videos