Applying Patches To Suckless Software

  Рет қаралды 31,928

DistroTube

DistroTube

3 жыл бұрын

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:
► suckless.org/ - Suckless
► gitlab.com/dwt1/dmenu-distrotube - DT's dmenu build
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.paypal.com/cgi-bin/webscr...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/stores/distrotube
SOCIAL PLATFORMS:
🗨️ Mastodon: mastodon.technology/@distrotube
💬 IRC: irc://freenode #distrotube
👫 Reddit: / distrotube
📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
DT ON THE WEB:
🕸️ Website: distrotube.com/
🐿️ Gopherhole: gopher://distro.tube
📁 GitLab: gitlab.com/dwt1
🔊 Audio Podcasts: www.buzzsprout.com/1263722
FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser - brave.com/dis872
📽️ Open Broadcaster Software: obsproject.com/
🎬 Kdenlive: kdenlive.org
🎨 GIMP: www.gimp.org/
🎵 Audacity: www.audacityteam.org/
💻 VirtualBox: www.virtualbox.org/
🗒️ Doom Emacs: github.com/hlissner/doom-emacs
Your support is very much appreciated. Thanks, guys!

Пікірлер: 78
@r.f.mineguy7715
@r.f.mineguy7715 3 ай бұрын
This is such a cool system for adding functionality to a program. I'm going to seriously look into more of the suckless projects.
@Chinmoku_No_Te
@Chinmoku_No_Te 3 жыл бұрын
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 happen.....my hat's off to you!!!
@btwiusearch1284
@btwiusearch1284 3 жыл бұрын
Perfect, right when I was considering installing DWM.
@MrRenanwill
@MrRenanwill 3 жыл бұрын
try to patch everything with more chances of no errors with:: cat *.diff | patch --verbose --ignore-whitespace --fuzz 3 -p1 I have applied the DistroTube patches and suffered just one error with that command and it was on the latest patch which generated one .ref file that I manually applied that "diff" patch.
@mecrumbly429___4
@mecrumbly429___4 3 жыл бұрын
You contradict yourself, Arch User!
@TeoV
@TeoV 2 жыл бұрын
@@MrRenanwill Thanks! It worked for me with no errors.
@2khz
@2khz 2 жыл бұрын
@@MrRenanwill This is a cool trick! I was going to get into using more suckless stuff - this'll be handy
@UnderTheTutelage
@UnderTheTutelage 3 жыл бұрын
Just got dwm yesterday and this is very timely . Thanks DT!
@jaydlc7732
@jaydlc7732 3 жыл бұрын
I find it helpful to do builds for each patch that I apply just so I know which diff I messed up
@PetrosSharp
@PetrosSharp 3 жыл бұрын
I love compiling software. That's why i use dwm in gentoo.
@VipinBalakrishnan
@VipinBalakrishnan 3 жыл бұрын
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.
@stevenhall912
@stevenhall912 3 жыл бұрын
I was about to suggest this as well. This is the easiest way I have found to do this, and I have had more success with merging branches like this than running patches individually. The other thing is, if you use git, you can also just use the 'git apply file.patch" to apply a patch file But ya, easiest to just have a branch tracking suckless, and then you can pull updates down and then merge it with your build's branch.
@jansenmtan
@jansenmtan 3 жыл бұрын
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. I wrote a simple script that goes through this process ix.io/2Dic 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
@albynoson
@albynoson 3 жыл бұрын
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.
@knutien9832
@knutien9832 3 жыл бұрын
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.
@kolemalik1229
@kolemalik1229 2 жыл бұрын
I guess im asking randomly but does anyone know a trick to get back into an Instagram account?? I was dumb lost the password. I appreciate any help you can offer me
@spitmirror
@spitmirror 9 ай бұрын
The blinky light rig on the left makes me think DJ WOPR lol
@apoorv9492
@apoorv9492 3 жыл бұрын
I recommend checking out - github.com/bakkeby 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. : ]
@oalfodr
@oalfodr 3 жыл бұрын
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
@oalfodr 3 жыл бұрын
Tip for people doing patching like this: try using gui git clients (I use smartgit). It shows exactly what changes you have made and it is easy to see mistakes.
@75dhib
@75dhib 3 жыл бұрын
Hey from France !
@arrtemfly
@arrtemfly 3 жыл бұрын
thanks!
@copper4eva
@copper4eva 3 жыл бұрын
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.
@digonto7156
@digonto7156 3 жыл бұрын
If you want, you can grab luke smith's st build. He has a pretty sensible setup of st.
@zedrobot5864
@zedrobot5864 3 жыл бұрын
We would like to see more of the suckless tools videos
@ScottSteely
@ScottSteely 3 жыл бұрын
DT's official now, he's in the AUR!
@thEClawtcl
@thEClawtcl 3 жыл бұрын
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?
@carlosllaque6855
@carlosllaque6855 3 жыл бұрын
What about --merge option when patching??
@hisbaan
@hisbaan 3 жыл бұрын
Hi DT! I was wondering if you plan on covering berrywm? It seems like a pretty cool project
@DistroTube
@DistroTube 3 жыл бұрын
Hadn't heard of that one. But a lot of the window managers I haven't covered by now are really "obscure" window managers. Sometimes you guys recommend me window managers that I can't even get installed. But hopefully this isn't one of those. Will add it to my "todo list". Thanks.
@hisbaan
@hisbaan 3 жыл бұрын
@@DistroTube Haha I've only heard good things about this one over on r/unixporn... Thanks for all the awesome vids :)
@dreamlockk7527
@dreamlockk7527 3 жыл бұрын
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
@kmbxD
@kmbxD 3 жыл бұрын
What patch work application from terminal like ranger?
@DannyMexen9
@DannyMexen9 3 жыл бұрын
Pretty much how I patched my suckless build. Thanks for the video.
@marcin6386
@marcin6386 3 жыл бұрын
It's looks like normal coding in C, with helps of already written code that is in patches. I think using suckless can be very educational.
@LloydLynx
@LloydLynx 3 жыл бұрын
DT got those saltines in his mug today
@enderger5308
@enderger5308 3 жыл бұрын
Can you cover doing this on NixOS?
@peterarbeitsloser7819
@peterarbeitsloser7819 3 жыл бұрын
Can you make a tutorial on how to patch with git branches?
@i28v50
@i28v50 3 жыл бұрын
There is almost no documentation on how to do this other than the suckless website, and that is still pretty vague, thank you.
@DistroTube
@DistroTube 3 жыл бұрын
The Suckless guys don't believe in documentation.
@hisbaan
@hisbaan 3 жыл бұрын
documentation = bloat (/s)
@TheBlueThird
@TheBlueThird 3 жыл бұрын
@@hisbaan How so?
@TheBlueThird
@TheBlueThird 3 жыл бұрын
@@DistroTube I think you need to know C pretty well from my understanding.
@jeetadityachatterjee6995
@jeetadityachatterjee6995 3 жыл бұрын
@@TheBlueThird it's a joke /s is a signifier for a joke
@janatjanat3808
@janatjanat3808 4 ай бұрын
ببخشید سوال شاید خنده اور باشد اما میخاستم بپرسم ایا این ترمینل در linux سرور ميباشد . يعني شما در linux server dmenu دانلود كرديد.
@klimenkodr123
@klimenkodr123 3 жыл бұрын
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. He're is how I do it. I clone the official clean repo (`git clone git.suckless.org/dwm`) and create a branch for each patch. This allows me to test patches individually and/or seeing how some of them interact with each other. 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.
@ganainm01
@ganainm01 3 жыл бұрын
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?
@armynyus9123
@armynyus9123 3 жыл бұрын
whats the benefit? I think thats one of the big reasons to use a window manager, doing that on the WM and not within the app(s). Don't get me wrong, I see the advantage of one nvim or emacs process for real development but with the clipboard setup he has, where he can yank/paste over different windows I don't see the advantage for his specific use case. PS: Using quilt for patch management - full ack.
@zehph
@zehph 3 жыл бұрын
@@armynyus9123 Never heard of quilt, got me curious with the 'ack' why so?
@armynyus9123
@armynyus9123 3 жыл бұрын
@@zehphquilt was developped for getting a hold on kernel patches, here the main use cases: www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/apas02.html If you ever used mercurial then their patch queues work pretty much the same. It just allows to manage contributions in a non linear way, compared to using a DVCS only.
@faerryn8708
@faerryn8708 3 жыл бұрын
Hey DT, have you ever tried a Wayland WM?
@DistroTube
@DistroTube 3 жыл бұрын
I can't use wayland for the stuff I do. So no.
@twb0109
@twb0109 3 жыл бұрын
@@DistroTube I know you can't use Wayland but giving Wayfire a "First Impressions" may be pretty fun though
@1Schueni
@1Schueni 3 жыл бұрын
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.
@clouddaemon4828
@clouddaemon4828 3 жыл бұрын
what a coincidence, i was trying to add the trayer patch to your dwm config! did I succeded? ... tune back on my next attempt to find out
@_herlanggayusuf9933
@_herlanggayusuf9933 3 жыл бұрын
Hey DT are u heard about floatplane. Linus Tech Tips make it. It maybe a good chance on that platform because a lot of tech tuber was there. Just for your info
@amshel9029
@amshel9029 3 жыл бұрын
Yea, it would be cool to hear his opinion about Floatplane.
@ATM-Tech
@ATM-Tech 3 жыл бұрын
I love floatplane but I'm guessing its something DT wouldn't like
@zehph
@zehph 3 жыл бұрын
Floatplane is no different from patreon, only focusing on video iirc, does it have a considerable user base? Since it is one smaller thing and he already pushes lbry, don't think he would invest the time to populate and maintain another platform, especially because it may have a sync function similar to lbry, so he would have to choose which one to use, which is a no brainer here.
@mark8200
@mark8200 3 жыл бұрын
Patch Arch next
@ridhowijaya7584
@ridhowijaya7584 3 жыл бұрын
Hey DT next make video dwmblocks pls👍
@DistroTube
@DistroTube 3 жыл бұрын
I like that idea!
@MpSniperM1911
@MpSniperM1911 3 жыл бұрын
DWM: choose your own bloat adventure??
@alephanull1953
@alephanull1953 3 жыл бұрын
Pretty awesome, amirite?
@shubhamdwivedi7766
@shubhamdwivedi7766 3 жыл бұрын
If my friends see me patching they think I am hacking lol😂
@leviticus8930
@leviticus8930 3 жыл бұрын
SUP?
@DistroTube
@DistroTube 3 жыл бұрын
Chillin' chillin'.
@HeCodes2Much
@HeCodes2Much 3 жыл бұрын
You still messed up that was ment to be fuzzy not fast under -F
@habibarrasyid8186
@habibarrasyid8186 3 жыл бұрын
do an arch linux install speedrun
@faerryn8708
@faerryn8708 3 жыл бұрын
No views but 2 comments
@allanwilson3590
@allanwilson3590 3 жыл бұрын
This seems to suck more...
@szyszkienty
@szyszkienty 3 жыл бұрын
This software should be called 'suckmore' instead.
@jodazague8333
@jodazague8333 3 жыл бұрын
why?
@ivanhoe1024
@ivanhoe1024 3 жыл бұрын
Totally agree, there is not a single reason why not to have a config file, other than if you are installing this thing on a 1980’s calculator with magnetic tape cassettes or similar... I mean, what kind of specs do you people have that can not handle properly a config file? Like 144 Hz cpu and 16K RAM?
Getting Started With Git and GitLab
24:34
DistroTube
Рет қаралды 41 М.
Patching Suckless Programs Made Easy
21:26
Mental Outlaw
Рет қаралды 88 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 112 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 21 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
What Are Linux Users Putting In Their Config Files?
31:47
DistroTube
Рет қаралды 91 М.
The 12 Linux Apps Everyone Should Know About
21:20
DistroTube
Рет қаралды 453 М.
Programs that Suck Less! suckless
11:14
Luke Smith
Рет қаралды 138 М.
Dwm, Suckless, Simple, yet Powerful 👍
17:22
Mental Outlaw
Рет қаралды 160 М.
Big things are coming to Linux in 2024, but don't expect too much...
17:17
The Linux Experiment
Рет қаралды 131 М.
A First Look At ArcoLinux With Dwm
29:03
DistroTube
Рет қаралды 82 М.
DWM - Break Free From Your Desktop Environment
33:45
OldTechBloke
Рет қаралды 17 М.
Configuring Dwm's Panel Is Easy With Dwmblocks
17:53
DistroTube
Рет қаралды 44 М.
SDesk...Yet Another Arch-Based Linux Distro? Or Something More?
22:47
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 380 М.