Skip to content

. #122

Answered by bakkeby
fov95 asked this question in Q&A
. #122
May 2, 2021 · 1 comment
Discussion options

You must be logged in to vote

I know you are not so much into C programming, but I'm sure you can appreciate the irony here.

One of the core fundamentals of dwm is the desire to get to below 2000 SLOC (source lines of code), and sometimes corners are cut to make the code more "clean" but mostly to save on a few lines of code.

The default keybinding to set the monocle layout, for example, is

    { MODKEY,                       XK_m,          setlayout,              {.v = &layouts[2]} },

This is passing the third row of the layouts array as a reference to the setlayout function. This could very well have just passed {.i = 2 }, but that would have required maybe three extra lines of code in setlayout.

Everything that you…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fov95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants