Patching Suckless Programs Made Easy

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • In this video I show you how to apply patches to Dwm with patch, and how to manually apply patches when they fail.
    Patches used in this video
    lists.suckless.org/dev/1104/7...
    dwm.suckless.org/patches/full...
    find more patches at dwm.suckless.org/patches
    Subscribe to my TH-cam channel goo.gl/9U10Wz
    and be sure to click that notification bell so you know when new videos are released. ₿💰💵💲Help Support the Channel by Donating Crypto💲💵💰₿
    Bitcoin
    3MMKHXPQrGHEsmdHaAGD59FWhKFGeUsAxV
    Ethereum
    0xeA4DA3F9BAb091Eb86921CA6E41712438f4E5079
    Litecoin
    MBfrxLJMuw26hbVi2MjCVDFkkExz8rYvUF
    Dash
    Xh9PXPEy5RoLJgFDGYCDjrbXdjshMaYerz
    Zcash
    t1aWtU5SBpxuUWBSwDKy4gTkT2T1ZwtFvrr
    Chainlink
    0x0f7f21D267d2C9dbae17fd8c20012eFEA3678F14
    Bitcoin Cash
    qz2st00dtu9e79zrq5wshsgaxsjw299n7c69th8ryp
    Etherum Classic
    0xeA641e59913960f578ad39A6B4d02051A5556BfC
    USD Coin
    0x0B045f743A693b225630862a3464B52fefE79FdB
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Holy shit I've been begging people to explain this to me all i got was the standard hah lol nub answer arch people tend to give.
    Thanks for this dude.

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

    For more complex patch sets, it’d be best just to use git. Keep an unpatched build in a separate branch from one you want to customize, then make separate branches for each patch and merge as needed. Git apply offers similar functionality to patch.

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

      This is really the best way to apply patches and keep suckless software updated.

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

      fakeventer sus!!

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

      Yes! Use git. That's why git was created!

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

      @@chuchomucho6655 SUS SUS SUS

    • @eac-ox2ly
      @eac-ox2ly 2 ปีที่แล้ว +3

      Bruh that's an amazing idea. How didn't I think of that before. Thanks, fr.

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

    This is the best video on dwm i have ever seen!

  • @Deathptbr
    @Deathptbr 3 ปีที่แล้ว +23

    I just wanted to say that you're the reason I switched to dwm, and I've been dying to try Gentoo as well because of your videos.
    Good stuff dude, keep it up

  • @elderberry-hamster
    @elderberry-hamster 4 ปีที่แล้ว +5

    Very helpful and straight to the point. Thank you for providing the tutorial. Much appreciated and desperately needed!! Keep them coming! :-)

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

    Great video. Thanks for keeping true to the actual worklflow of patching the files. For me, after a couple of clean patches after fresh install, it regularly fails and I have resort to manual patching. Really like your videos dude 👍

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

    Thanks. I already knew this, but still helped a lot.

  • @ridhowijaya7959
    @ridhowijaya7959 3 ปีที่แล้ว +10

    what a wonderful man.
    most elitis won't explain so detail like this

  • @0x007A
    @0x007A 2 ปีที่แล้ว +5

    To generate config.h from config.def.h use the command 'make' without any arguments. You have to delete config.h if it rxists before running make. Since the patches modify config.def.h, I initially copy config.def.h to config.def.h.original in case I ever want to reset dwm or st to their original state. The config.def.h.original only need be created one time.

  • @technomatic6285
    @technomatic6285 3 ปีที่แล้ว +1

    You can edit the GRUB resolution in /etc/default/grub while working in a VM to set a proper resolution.

  • @motif5775
    @motif5775 2 ปีที่แล้ว

    Great video, thank you!!

  • @_denzy_6310
    @_denzy_6310 3 ปีที่แล้ว +32

    You really wanna patch (.def) instead of (.h) since the Makefile will generate (.h) automatically so your changes will be lost

    • @mohammedmclovin4450
      @mohammedmclovin4450 2 ปีที่แล้ว +9

      wont 'config.h' be generated only if it doesnt exist?
      im just starting with patching, but after modifying 'config.h' and running 'sudo make clean install' (or simply 'sudo make', for what it matters), my changes to 'config.h' are still there.
      that said, i would think it is best to keep 'config.def.h' intact and work on 'config.h' instead.
      this way if you mess things up, you can just delete your broken 'config.h' and regenerate one with the original content from 'config.def.h'...

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

      just have to *mv config.def.h config.h"* to replace your config.def.h as config.h, then you do sudo make clean install

  • @rodrigosouto9502
    @rodrigosouto9502 3 ปีที่แล้ว +1

    Great guide

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

    Elitism is bs. You've earned a new subscriber for calling it out.

    • @casenc
      @casenc 3 ปีที่แล้ว +7

      They didn't though, they said "appealing to normies eventually hurts the product"

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

    Thanks. It looks good. I am currently on i3 but I might give this a try. One question, does dwm have smart gaps like i3, i.e., no gaps when there is a single window in a tag/workspace? I really like that feature.

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

    Really glad I found your channel! You have helped me a few times already! =^_^=

  • @overclucker
    @overclucker 3 ปีที่แล้ว +2

    add extra .c files to the Makefile, include .h files in .c that needs the definitions.

  • @acceptableconvo
    @acceptableconvo 3 ปีที่แล้ว +3

    as i understand it, config.def.h is the default config, and config.h is your user config. if config.h exists, it's used; if it doesn't exist, config.def.h is copied over to config.h before compilation. so, you shouldnt completely trash your config.def.h and rename it, you should keep it around as an emergency fallback config.h with all the default settings known to work for your set up of dwm+patches, and when you install a new patch, just go into config.def.h and find the new lines and copy them over (plus whatever personal settings you want) to your config.h file manually.

  • @lorddorogoth
    @lorddorogoth 3 ปีที่แล้ว +2

    What colors are you using in your terminal?

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

    thank you

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

    Great stuff! If you can zoom in a bit would be greater

  • @thengakola6217
    @thengakola6217 3 ปีที่แล้ว +1

    couldnt u make the fonts larger?

  • @spanky4446
    @spanky4446 3 ปีที่แล้ว +2

    Great video! I am still confused though, what is the point of having a config.h and a config.def.h?

    • @_denzy_6310
      @_denzy_6310 3 ปีที่แล้ว +1

      (.def) has definitions the Makefile will use to generate (.h)
      (.h) will be included in the actual code including defs in the (.def)

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

    Including a *.c file from a header file is a bit peculiar, although it technically works. You could instead patch dwm.c with the content of shiftview.c.

  • @richardeadon6396
    @richardeadon6396 3 ปีที่แล้ว +1

    "Betty Crockett" :D

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

    I'm new to tailing window managers like i3 & dwm.
    I have feeling that these WMs tend to have all opened apps are visible at all time. So its not best to use in smaller screen size.

    • @satan_8480
      @satan_8480 3 ปีที่แล้ว +1

      alt+m will full-screen whichever window your mouse is hovering over, and alt+t will switch back to tile mode

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

    I wonder why is config.def.h being patched and what's the reason behind separating this file and config.h?

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

      config.def.h gets copied to config.h if config.h does not yet exist. I believe "def" is for "default".

  • @richieseputro0
    @richieseputro0 2 ปีที่แล้ว

    Can anyone share some resources on keyboard keywords? Like in xkb keymappings, there are some keywords like Prior Next Super and whatnot...

    • @just__khang
      @just__khang 2 ปีที่แล้ว

      you can find it in your include folders. one is xkbcommon and another one is x11 xkblib
      for some reasons, youtube keep deleting my straightforward directory comments so i guess youtube sucks mad dick...

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

    what if a new version of patch get released? do i have to re-patch it with the newer diff?

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

      No. As long as you use the same build of dwm, you won't need to re-patch them. Newer patches seem to be for newer version of the program with source changes, but most people don't "update" the program since it would require redownloading and re-applying all patches.

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

      nice, thanx :D

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

      @@bubbyroosh4038 Then you are running an old version of st and missing out on new features. Applying new patches is very quick unless they don't work with the new st version.

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

      @@randomuser2579 If you're using a suckless program why would you update it to get a new feature :| If you get a build that you like, you don't need to update it (unless you want the new features) as some patches may become incompatible/outdated.

    • @mohammedmclovin4450
      @mohammedmclovin4450 2 ปีที่แล้ว

      ​​@@bubbyroosh4038 this reasoning would be true to any software, not only suckless stuff. if you are happy with v1, why bother updating to v2? well, because in 99% of the cases we do want the new features! and that kinda makes your point irrelevant, albeit correct.
      the diff with suckless is that you may (very unlikely) lose your own mods if they are no longer supported by the new version. you would still need to re-patch the new version, but that shouldn't be much of an effort anyway, as already pointed out.

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

    how to make auto start app ?

    • @sikorsp22
      @sikorsp22 3 ปีที่แล้ว +1

      in .xinitrc file:
      app-name &
      app2-name &
      There is also a patch for dwm to autostart but I think this is easier

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

    JIT, I downloaded dwm.

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

    here is a suggestion, please increase the size of whatever you're showing, and extra increase the size of terminal font..

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

      I just patched a zoom feature into my terminal emulator, should be better going forward.

  • @user-qx2ec7oe9p
    @user-qx2ec7oe9p 10 หลายเดือนก่อน

    I think not having a config file is stupid… sometimes a want to tinker without compiling and reinstalling a bunch of time.

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

    Dwm moveresize does not work

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

    well all I need now is to buy myself a buttonboard :P

  • @cianmoriarty7345
    @cianmoriarty7345 ปีที่แล้ว

    #including a .c file... 🤔😬

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

    Man, I like your content but you gotta learn to zoom in bruhh. I couldn't see shit in my mobile and now I'm on my PC and still have a little difficulty. Not everyone has a huge ass monitor.

  • @weedeater64
    @weedeater64 2 ปีที่แล้ว

    It's a damn shame shame your videos and most of the videos by others about suckless, are not suckless.

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

    What colors are you using in your terminal?