bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.15k stars 233 forks source link

bar border patch #41

Closed plasmoduck closed 4 years ago

plasmoduck commented 4 years ago

Please include this patch which draws a border around the vanilla dwm bar to match like window borders https://codemadness.org/paste/dwm-border-bar.patch

Example screenshot: https://i.redd.it/mqzxl88fz3051.png

plasmoduck commented 4 years ago

Nice work on adding the bar border patch :+1: Do you have a diff for just the bar border patch for your build I can add to mine without everything else? The ipc in the new build is giving me lots of problems, even though its disabled in patches.def.h. I had to remove all the ipc related lines from Makefile which got a bit futher, but still didn't compile. Tried going through here https://github.com/bakkeby/dwm-flexipatch/commit/ff9811f73d1f3d47a6ab7a2a7e44308bf849fb44 and adding the bar_border bits but im missing some parts still.

Cheers Plasmoduck

bakkeby commented 4 years ago

Besides a few unrelated compatibility fixes the above commit is all that I changed to get the borders working.

What kind of issues did you have with the makefile? I suppose there are differences in the syntax for the FreeBSD make compared to GNU Make, ref. https://www.freebsd.org/cgi/man.cgi?make(1) looking at the conditionals section it looks like all the ifdef, else and endif get a dot prefix.

plasmoduck commented 4 years ago

Yes I had to remove all the ifdef, else, endif lines relating to ipc from Makefile to get it to complie. I got the new build to compile, however, after restarting dwm to the new build, there is no bar, I can't use any keybinds. I checked and dwm process is running. It's just like frozen, but I can still use whatever windows I had open previously, terminals, browser etc.

I cloned a fresh copy and omited the dots to .ifdef .else .endif in Makefile, now that works fine, dwm compiles fine, but same thing, its still broken. Mind you, I did NOT change anything in patches.deh.h, just compiled as is.

plasmoduck commented 4 years ago

Is dwm.c and patches.def.h the only files that need changing for the bar_border patch?

plasmoduck commented 4 years ago

Not sure if it helps or not, but here is my build if its easier for you to make a .diff for that? If I knew what goes where I could do it myself :+1:

bakkeby commented 4 years ago

Is dwm.c and patches.def.h the only files that need changing for the bar_border patch?

If you look at the above commit there are 49 changed files, most of which are directly related to the bar border patch. Besides dwm.c changes you'll need all the patch/bar_* files as well, which should be trivial presuming that you have not made any changes to these in your own build. I'd imagine that you could outright replace them.

Tools like diffuse or meld are also useful when looking at differences between two files.

About dwm not running, try removing the trailing { NULL } in the barrules section or take this change: https://github.com/bakkeby/dwm-flexipatch/commit/ed0e503a6ba33927b0aa1f06690ec8724cc6a552

Edit: screwed the above commit up, correction below https://github.com/bakkeby/dwm-flexipatch/commit/f4a6866e8c281bf9098d167fa6032e2eb19b87cd

plasmoduck commented 4 years ago

Thanks for getting back to me, I'll look into it soon. I replaced all the patch/bar_files and it compiled fine but just no bar and functionality. Do you have some way of accepting donations? If so, I'd like to make a donation to help continue your excellent work.

plasmoduck commented 4 years ago

I managed to get the latest build working :) Thanks for much for the help

bakkeby commented 4 years ago

:+1: Glad to hear that you got it working. As for donations, no I do not have anything like that :)

bakkeby commented 4 years ago

Oh and just to note, the colour of the bar border is controlled by the scheme set here: https://github.com/bakkeby/dwm-flexipatch/blob/master/dwm.c#L1408

This defaults to SchemeNorm. You can change the scheme to something else if you prefer (maybe even create a new scheme).

I haven't made this otherwise configurable as I'm considering it as a sort of placeholder with the long term plan being to have per-bar configuration options.

plasmoduck commented 4 years ago

Yeah that's fair enough, Im happy with it using SchemeNorm, otherwise I shall create a new enum Scheme. What do you think about this patch? Are you using it? I think it's a nice little eye candy that just makes the bar match with the windows more. Do you have some kind of IM service I can add you to? Skype/Steam/GTalk etc? Here is my perfect setup, thanks to you ;) :+1: shot

bakkeby commented 4 years ago

That looks rather nice. I'm using it now, maybe primarily to look for potential bugs, but it is kind of growing on me.

plasmoduck commented 4 years ago

I quite like Gruvbox color scheme, easy on the eyes and nice when you can have a system wide config. BTW, if you want to play with the name outputted by dwm to programs like neofetch, pfetch for example, you can change this string in dwm.c; PropModeReplace, (unsigned char ) "dwm", 3); to PropModeReplace, (unsigned char ) "dwm-flexipatch", 14); to make it more your own :+1:

bakkeby commented 4 years ago

Good to know, thanks. Maybe I'll use that if I ever branch off dwm-flexipatch.