Explaining dwm source code. It's not complicated!

  Рет қаралды 13,459

Avahe Kellenberger

Avahe Kellenberger

Күн бұрын

Пікірлер: 30
@cdajfk9219
@cdajfk9219 2 жыл бұрын
This is really well done, thank you! As a noob I wasn't expecting to comprehend much, but you were able to translate your understanding in terms that anyone could digest. Not many people can do that, especially on KZbin. Really appreciate you taking the time to do this & I hope you keep making videos!
@joneskin1432
@joneskin1432 3 жыл бұрын
I've spent a good amount of time looking at suckless code to try to learn C. A lot of what's in the code is what I previously learned to be antipatterns- stuff like prolific use of globals, almost all variables/methods are static, lots of typedefs, etc. I'm guessing that most of these are deemed fine because the codebase is so small- my understanding is those things can get out of control when codebases get very large. I love how the code is so clean and readable, but I also wish I knew where there was some discussion on design choices and architecture of it that I could learn from.
@avahekellenberger4982
@avahekellenberger4982 3 жыл бұрын
I agree that their architecture isn't very scalable, and you're probably correct that they chose this route with the intent of keeping the code base very small. Not sure if I'll cover it, but I think i3's code base is much more organized if you'd like to take a look.
@mattwilliams1844
@mattwilliams1844 Жыл бұрын
They are declared as static globals because the variable needs to live through out the entire programs execution. remember that in C the keyword static means different things based on the context it is used in. For example if you declare a static variable inside a function it means the value of that variable will persist through many function calls. If static is used in a global context it makes that variable or function private to only that file. That is how C handles encapsulation. These aren't considered anti-patterns in C because it is not an OOP language. in C++ for example Display dpy could be wrapped in class that holds it as a unique_ptr, and you could use it that way to etc etc. DWM's code base is not so scalable, but it can be easily refactored to be so. Remember the entire Linux kernel is in C, and you will see similar approaches to common problems. Splitting DWM's code into separate files, using more descriptive variable names, and adding better file/function documentation would make it more welcoming.
@SuperKhezar
@SuperKhezar 2 жыл бұрын
5:37 line 247 is that a function pointer that takes an array of other function pointers and maps them to the event types? I'm trying to understand how that works. Edit 1: line number typo
@manabuizayoi9567
@manabuizayoi9567 2 жыл бұрын
From my understanding line 247 is an array of function pointers, and the next lines are just mapping the indexes of the array to the respective functions
@happygofishing
@happygofishing 10 ай бұрын
"this is for opembsd, nobody cares" 😂
@TanyaParker-h5v
@TanyaParker-h5v Ай бұрын
Moore Laura Anderson Maria Lopez Mark
@motif5775
@motif5775 3 жыл бұрын
Great video and information, thank you much good sir!!
@theodorealenas3171
@theodorealenas3171 2 жыл бұрын
Is it easier to manually change DWM or BSPWM? Shall I make DWM read a named pipe, or shall I try to modify manually BSPWM?
@alexferreira4401
@alexferreira4401 Жыл бұрын
I like your color scheme. Do you have a repo with your dotfiles? also, whats that firefox theme?
@DavidEngelen
@DavidEngelen 9 ай бұрын
Thank you so much for this video 😄
@dakyskye
@dakyskye 3 жыл бұрын
Good video 👍
@ahmedsaadsabit1749
@ahmedsaadsabit1749 Жыл бұрын
This is so fucking awesome
@rsmith31416
@rsmith31416 2 жыл бұрын
Awesome video!
@xy9439
@xy9439 3 жыл бұрын
Awesome video
@armynyus9123
@armynyus9123 3 жыл бұрын
This is beautiful. Btw: Why do people not like X anymore, I find the architecture quite convincing.
@low-key-gamer6117
@low-key-gamer6117 2 жыл бұрын
Less secure than Wayland, unorganised mess.
@-aexc-
@-aexc- Жыл бұрын
also much worse multimonitor support when you're mixing monitors
@armynyus9123
@armynyus9123 Жыл бұрын
@@-aexc- I heard the opposite: Multi display in wayland suck when resolutions differ. I could not imagine better support than I have in X, I mean: Nothing missing, all working, even with 3 displays.
@spht9ng
@spht9ng Жыл бұрын
Why would the function's return type be on the line above and not inline with the function? wtf that looks so bad lmao
@bhavyakukkar
@bhavyakukkar 5 ай бұрын
Makes it easier to search for functions because you know there'll be at line start
@joaopauloalbq
@joaopauloalbq 3 жыл бұрын
This video is bloated :v
@agungsatria9196
@agungsatria9196 2 жыл бұрын
Tf
@AtomToast
@AtomToast 3 жыл бұрын
good video but please don't go around rooms and spam your stuff without context
@avahekellenberger4982
@avahekellenberger4982 3 жыл бұрын
Thanks, but I've only shared it in a friend's discord server (once). If someone is spamming links to my videos, it isn't me
@AtomToast
@AtomToast 3 жыл бұрын
Okay damn. Well then I guess you have a very passionate fan :)
@BryanJenks
@BryanJenks 3 жыл бұрын
LOL hey Atom, i love how we always end up on the save content 🙃️
@AtomToast
@AtomToast 3 жыл бұрын
I mean your discord was one of the places this got posted in :p
Dwm patches (explaining source code)
21:32
Avahe Kellenberger
Рет қаралды 2,8 М.
Suckless's dwm: So easy even a caveman could do it!
12:25
Luke Smith
Рет қаралды 286 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 2 МЛН
Turn Your Window Manager Into A Desktop Environment
16:47
DistroTube
Рет қаралды 140 М.
X11 App in C with Xlib
2:17:23
Tsoding Daily
Рет қаралды 28 М.
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,7 МЛН
Patching Suckless Programs Made Easy
21:26
Mental Outlaw
Рет қаралды 90 М.
dwm - the Brilliant Window Manager
14:37
Ampersand
Рет қаралды 8 М.
Programs that Suck Less! suckless
11:14
Luke Smith
Рет қаралды 140 М.
DWM-Flexipatch - DWM Has Never Been This Easy!
27:24
OldTechBloke
Рет қаралды 10 М.
Dwm, Suckless, Simple, yet Powerful 👍
17:22
Mental Outlaw
Рет қаралды 164 М.
Dwm Is a GREAT Window Manager (After It's Patched!)
22:01
DistroTube
Рет қаралды 41 М.