Patching Suckless Programs Made Easy

  Рет қаралды 90,717

Mental Outlaw

Mental Outlaw

Күн бұрын

Пікірлер: 73
@nictanghe98
@nictanghe98 4 жыл бұрын
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 жыл бұрын
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 жыл бұрын
This is really the best way to apply patches and keep suckless software updated.
@uiopuiop3472
@uiopuiop3472 3 жыл бұрын
fakeventer sus!!
@chuchomucho6655
@chuchomucho6655 3 жыл бұрын
Yes! Use git. That's why git was created!
@uiopuiop3472
@uiopuiop3472 3 жыл бұрын
@@chuchomucho6655 SUS SUS SUS
@eac-ox2ly
@eac-ox2ly 2 жыл бұрын
Bruh that's an amazing idea. How didn't I think of that before. Thanks, fr.
@_denzy_6310
@_denzy_6310 3 жыл бұрын
You really wanna patch (.def) instead of (.h) since the Makefile will generate (.h) automatically so your changes will be lost
@mohammedmclovin4450
@mohammedmclovin4450 2 жыл бұрын
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 Жыл бұрын
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
@codebitcookie8053
@codebitcookie8053 4 жыл бұрын
This is the best video on dwm i have ever seen!
@Deathptbr
@Deathptbr 3 жыл бұрын
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
@perseusarkouda
@perseusarkouda 4 жыл бұрын
Elitism is bs. You've earned a new subscriber for calling it out.
@casenc
@casenc 3 жыл бұрын
They didn't though, they said "appealing to normies eventually hurts the product"
@ridhowijaya7959
@ridhowijaya7959 4 жыл бұрын
what a wonderful man. most elitis won't explain so detail like this
@0x007A
@0x007A 2 жыл бұрын
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 4 жыл бұрын
Very helpful and straight to the point. Thank you for providing the tutorial. Much appreciated and desperately needed!! Keep them coming! :-)
@acceptableconvo
@acceptableconvo 4 жыл бұрын
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.
@conradmbugua9098
@conradmbugua9098 Жыл бұрын
or just you git
@elclippo4182
@elclippo4182 3 жыл бұрын
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.
@chuchomucho6655
@chuchomucho6655 3 жыл бұрын
100% yes! Include it in dwm.c instead!
@overclucker
@overclucker 3 жыл бұрын
add .c to the Makefile
@mohammedmclovin4450
@mohammedmclovin4450 2 жыл бұрын
yep. that makes much more sense!
@hardorbit
@hardorbit 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 👍
@anytrant2610
@anytrant2610 4 жыл бұрын
here is a suggestion, please increase the size of whatever you're showing, and extra increase the size of terminal font..
@MentalOutlaw
@MentalOutlaw 4 жыл бұрын
I just patched a zoom feature into my terminal emulator, should be better going forward.
@overclucker
@overclucker 3 жыл бұрын
add extra .c files to the Makefile, include .h files in .c that needs the definitions.
@lorddorogoth
@lorddorogoth 3 жыл бұрын
What colors are you using in your terminal?
@technomatic6285
@technomatic6285 3 жыл бұрын
You can edit the GRUB resolution in /etc/default/grub while working in a VM to set a proper resolution.
@spanky4446
@spanky4446 3 жыл бұрын
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 жыл бұрын
(.def) has definitions the Makefile will use to generate (.h) (.h) will be included in the actual code including defs in the (.def)
@richardeadon6396
@richardeadon6396 3 жыл бұрын
"Betty Crockett" :D
@mariansam_was_taken
@mariansam_was_taken 4 жыл бұрын
Thanks. I already knew this, but still helped a lot.
@diegorodriguez8920
@diegorodriguez8920 Жыл бұрын
What colors are you using in your terminal?
@LabiaLicker
@LabiaLicker Жыл бұрын
Its gruvbox
@user-qx2ec7oe9p
@user-qx2ec7oe9p Жыл бұрын
I think not having a config file is stupid… sometimes a want to tinker without compiling and reinstalling a bunch of time.
@thengakola6217
@thengakola6217 3 жыл бұрын
couldnt u make the fonts larger?
@macgeek21
@macgeek21 Ай бұрын
why is he doing this manually instead of using patch?
@rodrigosouto9502
@rodrigosouto9502 3 жыл бұрын
Great guide
@cianmoriarty7345
@cianmoriarty7345 Жыл бұрын
#including a .c file... 🤔😬
@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! =^_^=
@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 жыл бұрын
alt+m will full-screen whichever window your mouse is hovering over, and alt+t will switch back to tile mode
@richieseputro0
@richieseputro0 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 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...
@MuminovicGoran
@MuminovicGoran 4 жыл бұрын
well all I need now is to buy myself a buttonboard :P
@motif5775
@motif5775 3 жыл бұрын
Great video, thank you!!
@leoliu2079
@leoliu2079 4 жыл бұрын
Great stuff! If you can zoom in a bit would be greater
@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".
@x1x2x125
@x1x2x125 4 жыл бұрын
Dwm moveresize does not work
@DannyMexen9
@DannyMexen9 4 жыл бұрын
JIT, I downloaded dwm.
@anytrant2610
@anytrant2610 4 жыл бұрын
thank you
@ridhowijaya7959
@ridhowijaya7959 4 жыл бұрын
how to make auto start app ?
@sikorsp22
@sikorsp22 3 жыл бұрын
in .xinitrc file: app-name & app2-name & There is also a patch for dwm to autostart but I think this is easier
@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.
@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.
Google is Running Out of Storage
8:59
Mental Outlaw
Рет қаралды 939 М.
Applying Patches To Suckless Software
20:02
DistroTube
Рет қаралды 32 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 23 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 23 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,6 МЛН
Wrap Your Brain around 'Patch' and 'Diff' on Linux
10:21
Luke Smith
Рет қаралды 63 М.
Dwm, Suckless, Simple, yet Powerful 👍
17:22
Mental Outlaw
Рет қаралды 164 М.
SimpleX Chat - Next Level Private Messaging
15:54
Mental Outlaw
Рет қаралды 12 М.
Let's Rice Our Dmenu With Patching
21:38
DistroTube
Рет қаралды 75 М.
My build of DWM - Patches I use
16:35
Max Hu
Рет қаралды 3,2 М.
Suckless's dwm: So easy even a caveman could do it!
12:25
Luke Smith
Рет қаралды 286 М.
The Suckless Status Bar
10:02
WesleyAda
Рет қаралды 6 М.
Literally stop using i3-gaps & use Suckless dwm rn
10:16
Luke Smith
Рет қаралды 168 М.
NixOS Setup Guide - Configuration / Home-Manager / Flakes
3:01:39
Matthias Benaets
Рет қаралды 191 М.
Bloating up DWM 6.4 with 12 patches
37:57
linux dabbler
Рет қаралды 7 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 23 МЛН