Applying Patches To Suckless Software

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ธ.ค. 2024

ความคิดเห็น • 78

  • @btwiusearch1284
    @btwiusearch1284 4 ปีที่แล้ว +27

    Perfect, right when I was considering installing DWM.

    • @MrRenanwill
      @MrRenanwill 4 ปีที่แล้ว +7

      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 4 ปีที่แล้ว

      You contradict yourself, Arch User!

    • @TeoV
      @TeoV 3 ปีที่แล้ว

      @@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

  • @Chinmoku_No_Te
    @Chinmoku_No_Te 4 ปีที่แล้ว +8

    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!!!

  • @r.f.mineguy7715
    @r.f.mineguy7715 8 หลายเดือนก่อน

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

  • @UnderTheTutelage
    @UnderTheTutelage 4 ปีที่แล้ว +1

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

  • @VipinBalakrishnan
    @VipinBalakrishnan 4 ปีที่แล้ว +2

    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 4 ปีที่แล้ว +1

      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.

  • @PetrosSharp
    @PetrosSharp 4 ปีที่แล้ว +6

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

  • @jaydlc7732
    @jaydlc7732 4 ปีที่แล้ว +6

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

  • @knutien9832
    @knutien9832 4 ปีที่แล้ว +5

    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 3 ปีที่แล้ว

      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

  • @jansenmtan
    @jansenmtan 4 ปีที่แล้ว +2

    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 4 ปีที่แล้ว +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.

  • @oalfodr
    @oalfodr 4 ปีที่แล้ว +1

    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 4 ปีที่แล้ว

      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.

  • @apoorv9492
    @apoorv9492 4 ปีที่แล้ว +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. : ]

  • @janatjanat3808
    @janatjanat3808 9 หลายเดือนก่อน +1

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

  • @carlosllaque6855
    @carlosllaque6855 4 ปีที่แล้ว +1

    What about --merge option when patching??

  • @klimenkodr123
    @klimenkodr123 4 ปีที่แล้ว +1

    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.

  • @odinseye-y8k
    @odinseye-y8k ปีที่แล้ว

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

  • @hisbaan
    @hisbaan 4 ปีที่แล้ว +2

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

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +4

      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 4 ปีที่แล้ว +1

      @@DistroTube Haha I've only heard good things about this one over on r/unixporn... Thanks for all the awesome vids :)

  • @enderger5308
    @enderger5308 4 ปีที่แล้ว +1

    Can you cover doing this on NixOS?

  • @marcin6386
    @marcin6386 4 ปีที่แล้ว

    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.

  • @kmbxD
    @kmbxD 4 ปีที่แล้ว

    What patch work application from terminal like ranger?

  • @thEClawtcl
    @thEClawtcl 4 ปีที่แล้ว +2

    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?

  • @i28v50
    @i28v50 4 ปีที่แล้ว +1

    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  4 ปีที่แล้ว +4

      The Suckless guys don't believe in documentation.

    • @hisbaan
      @hisbaan 4 ปีที่แล้ว

      documentation = bloat (/s)

    • @TheBlueThird
      @TheBlueThird 4 ปีที่แล้ว +1

      @@hisbaan How so?

    • @TheBlueThird
      @TheBlueThird 4 ปีที่แล้ว +1

      @@DistroTube I think you need to know C pretty well from my understanding.

    • @jeetadityachatterjee6995
      @jeetadityachatterjee6995 4 ปีที่แล้ว

      @@TheBlueThird it's a joke /s is a signifier for a joke

  • @copper4eva
    @copper4eva 4 ปีที่แล้ว

    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 4 ปีที่แล้ว

      If you want, you can grab luke smith's st build. He has a pretty sensible setup of st.

  • @peterarbeitsloser7819
    @peterarbeitsloser7819 4 ปีที่แล้ว

    Can you make a tutorial on how to patch with git branches?

  • @faerryn8708
    @faerryn8708 4 ปีที่แล้ว +1

    Hey DT, have you ever tried a Wayland WM?

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +1

      I can't use wayland for the stuff I do. So no.

    • @twb0109
      @twb0109 4 ปีที่แล้ว

      @@DistroTube I know you can't use Wayland but giving Wayfire a "First Impressions" may be pretty fun though

  • @LloydLynx
    @LloydLynx 4 ปีที่แล้ว

    DT got those saltines in his mug today

  • @ScottSteely
    @ScottSteely 4 ปีที่แล้ว

    DT's official now, he's in the AUR!

  • @zedrobot5864
    @zedrobot5864 4 ปีที่แล้ว

    We would like to see more of the suckless tools videos

  • @ganainm01
    @ganainm01 4 ปีที่แล้ว +1

    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 4 ปีที่แล้ว

      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 4 ปีที่แล้ว

      @@armynyus9123 Never heard of quilt, got me curious with the 'ack' why so?

    • @armynyus9123
      @armynyus9123 4 ปีที่แล้ว

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

  • @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

  • @1Schueni
    @1Schueni 4 ปีที่แล้ว

    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.

  • @75dhib
    @75dhib 4 ปีที่แล้ว

    Hey from France !

  • @DannyMexen9
    @DannyMexen9 4 ปีที่แล้ว

    Pretty much how I patched my suckless build. Thanks for the video.

  • @_herlanggayusuf9933
    @_herlanggayusuf9933 4 ปีที่แล้ว +2

    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 4 ปีที่แล้ว

      Yea, it would be cool to hear his opinion about Floatplane.

    • @ATM-Tech
      @ATM-Tech 4 ปีที่แล้ว

      I love floatplane but I'm guessing its something DT wouldn't like

    • @zehph
      @zehph 4 ปีที่แล้ว

      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.

  • @clouddaemon4828
    @clouddaemon4828 4 ปีที่แล้ว

    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

  • @arrtemfly
    @arrtemfly 4 ปีที่แล้ว

    thanks!

  • @mark8200
    @mark8200 4 ปีที่แล้ว +1

    Patch Arch next

  • @leviticus8930
    @leviticus8930 4 ปีที่แล้ว +1

    SUP?

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +2

      Chillin' chillin'.

  • @shubhamdwivedi7766
    @shubhamdwivedi7766 4 ปีที่แล้ว +4

    If my friends see me patching they think I am hacking lol😂

  • @TrueWordsOfEternity
    @TrueWordsOfEternity 4 ปีที่แล้ว +1

    You still messed up that was ment to be fuzzy not fast under -F

  • @MpSniperM1911
    @MpSniperM1911 4 ปีที่แล้ว

    DWM: choose your own bloat adventure??

  • @ridho2d
    @ridho2d 4 ปีที่แล้ว

    Hey DT next make video dwmblocks pls👍

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +1

      I like that idea!

  • @allanwilson3590
    @allanwilson3590 4 ปีที่แล้ว

    This seems to suck more...

  • @faerryn8708
    @faerryn8708 4 ปีที่แล้ว

    No views but 2 comments

  • @habibarrasyid8186
    @habibarrasyid8186 4 ปีที่แล้ว

    do an arch linux install speedrun

  • @szyszkienty
    @szyszkienty 4 ปีที่แล้ว +1

    This software should be called 'suckmore' instead.

    • @jodazague8333
      @jodazague8333 4 ปีที่แล้ว

      why?

    • @ivanhoe1024
      @ivanhoe1024 4 ปีที่แล้ว

      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?