Patching Suckless Programs Made Easy

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 72

  • @nictanghe98
    @nictanghe98 4 года назад +132

    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 года назад +98

    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 года назад +17

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

    • @uiopuiop3472
      @uiopuiop3472 3 года назад

      fakeventer sus!!

    • @chuchomucho6655
      @chuchomucho6655 3 года назад +5

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

    • @uiopuiop3472
      @uiopuiop3472 3 года назад

      @@chuchomucho6655 SUS SUS SUS

    • @eac-ox2ly
      @eac-ox2ly 3 года назад +3

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

  • @Deathptbr
    @Deathptbr 4 года назад +25

    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

  • @codebitcookie8053
    @codebitcookie8053 4 года назад +49

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

  • @ridhowijaya7959
    @ridhowijaya7959 4 года назад +11

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

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

  • @0x007A
    @0x007A 3 года назад +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.

  • @elderberry-hamster
    @elderberry-hamster 5 лет назад +5

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

  • @_denzy_6310
    @_denzy_6310 3 года назад +33

    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 2 года назад +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

  • @acceptableconvo
    @acceptableconvo 4 года назад +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.

  • @technomatic6285
    @technomatic6285 3 года назад +1

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

  • @perseusarkouda
    @perseusarkouda 4 года назад +23

    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"

  • @mariansam_was_taken
    @mariansam_was_taken 4 года назад +2

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

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

  • @overclucker
    @overclucker 3 года назад +2

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

  • @lorddorogoth
    @lorddorogoth 4 года назад +2

    What colors are you using in your terminal?

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

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

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

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

  • @motif5775
    @motif5775 3 года назад

    Great video, thank you!!

  • @xrguktmfpb
    @xrguktmfpb 3 года назад

    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 3 года назад

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

  • @andreipopescu7636
    @andreipopescu7636 4 года назад

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

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

  • @EmancipatedSquirrel
    @EmancipatedSquirrel 4 года назад

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

  • @richardeadon6396
    @richardeadon6396 3 года назад +1

    "Betty Crockett" :D

  • @rodrigosouto9502
    @rodrigosouto9502 3 года назад +1

    Great guide

  • @leoliu2079
    @leoliu2079 4 года назад

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

  • @ridhowijaya7959
    @ridhowijaya7959 4 года назад

    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

  • @macgeek21
    @macgeek21 4 месяца назад

    why is he doing this manually instead of using patch?

  • @x1x2x125
    @x1x2x125 4 года назад

    Dwm moveresize does not work

  • @DannyMexen9
    @DannyMexen9 4 года назад

    JIT, I downloaded dwm.

  • @MuminovicGoran
    @MuminovicGoran 4 года назад

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

  • @anytrant2610
    @anytrant2610 4 года назад

    thank you

  • @cianmoriarty7345
    @cianmoriarty7345 Год назад

    #including a .c file... 🤔😬

  • @NerdistRay
    @NerdistRay 4 года назад

    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?