bakkeby / dwm-flexipatch

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

patch request #23

Closed kronikpillow closed 4 years ago

kronikpillow commented 4 years ago

https://dwm.suckless.org/patches/statuscmd/

bakkeby commented 4 years ago

I have seen this patch. I haven't taken this yet as it's going to conflict with a few patches, systray and barpadding at least. I'll have a look at some point.

kronikpillow commented 4 years ago

yes i tried applying it manually, it's conflicting with systray, althou on luke's dwm build it seems to be working with bar padding ... its a good patch that allows you to actually have a clickable systray

bakkeby commented 4 years ago

Also conflicts with extrabar and awesomebar.

bakkeby commented 4 years ago

I think it works. Have a go.

bakkeby commented 4 years ago

@kronikpillow in other news I've just been sent a multiple scratchpads patch, something you've asked about before. I'll add it at the earliest convenience.

Edit: Added earlier today

kronikpillow commented 4 years ago

thank you bakkeby :) I have noticed, sorry for the slow replies lately, I'v been busy in RL :) In my spare time I'v been trying to port this patch to flexipatch statuscdm patch with dwmblocks which allows a clickable dwmblocks statusbar, but so far I have been unsuccessful :-/

bakkeby commented 4 years ago

I'm assuming the idea would be to use this in combination with https://github.com/torrinfail/dwmblocks

kronikpillow commented 4 years ago

yes, dwmblocks with that patch on top of dmwblocks and dwm, allows a user to have a fully functional clickable statusbar that can use i3block modules in it

kronikpillow commented 4 years ago

you can see a fully functional preview of the patch by installing LukeSmithxyz dwm & LukeSmithxyz dwmblocks ... but you would have to put his statusbar scripts in your path to test it out :) ... it's just a example thou, I find it very useful, and I do use dwmblocks myself :)

kronikpillow commented 4 years ago

pic-full-200430-2013-25 pic-full-200430-2013-29 pic-full-200430-2013-34 pic-full-200430-2013-52

or some examples like this, when I click the date module, it gives me a calcurse calendar notification with appointments, when I click on the email module it actually opens neomutt etc

kronikpillow commented 4 years ago

maybe a dwmblocks flexipatch? and an option in dmw-flexipatch that you can use both in conjunction with each other :dagger: then, we could have a vanitygaps + multiple scratchpad + dwmblocks full functionality from i3 with gaps, statusbar and i3block modules, and scratchpad :D

kronikpillow commented 4 years ago

the submited patch is a patch both for dwm and dwmblocks, plus there are additional dwmblocks patches like one that removes icons from the modules.h and allows a user to use icons in the scripts instead, etc etc etc, and I'm sure you could think of many other things you could do with that statusbar, it's lightweight, and fast, my favorite option regarding statusbars in dwm

bakkeby commented 4 years ago

I have added the patch now, ~but I couldn't quite get the actions to trigger when I click on the relevant text in the status bar - wondering if it might be something the patch diff is missing.~

~Since you have it working on your system could you give it a go to see if it works for you?~

Edit: nevermind, worked it out.

kronikpillow commented 4 years ago

I dunno what to say except thank you very much :) I will test it out now, and give you more feedback and possibly some suggestions

kronikpillow commented 4 years ago

works nicely :) but if you compare the original patch, the original patch removes

/* commands spawned when clicking statusbar, the mouse button pressed is exported as BUTTON */
static const char *statuscmds[] = { "notify-send Mouse$BUTTON" };
static char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL };
static int statuscmdn;
static int lastbutton;

from statuscmd because the mouse key functions are bound in the i3blocks statusbar scripts

kronikpillow commented 4 years ago

also another suggestion

IF DWMBLOCKS & AUTOSTART autostart ret = system("killall -q dwmblocks; dwmblocks &");

so that dwmblocks is refreshed on dwm refresh

bakkeby commented 4 years ago

Yes you are right, those variables, as well as the additional code in spawn, are redundant when dwmblocks is enabled. Removed them.

As for the latter, that sounds more like something you may want to put in the autostart.sh script (if you use that). It doesn't sound like a good idea to hardcode something like that into a patch (the executable may go by a different name, or may not necessarily be in the path).

kronikpillow commented 4 years ago

true, I still hardcoded it :D :)

anyways i think you missed static const char statusexport[] = "export BUTTON=-;"; from statuscmd.c to remove it from dwmblocks+statuscmd patch

kronikpillow commented 4 years ago

the updated scratchpad patch is missing some examples of how to setup scratchpad rules ... example

    { NULL,       NULL,       "spterm",   NULL,         SPTAG(0),    1,           1,           1,          0,         -1 },
    { NULL,       NULL,       "spcalc",   NULL,         SPTAG(1),    0,           1,           1,          0,         -1 },
kronikpillow commented 4 years ago

another suggestion for swallow patch: option to not swallow floating windows

bakkeby commented 4 years ago

anyways i think you missed static const char statusexport[] = "export BUTTON=-;"; from statuscmd.c to remove it from dwmblocks+statuscmd patch

You are right, fixed that.

the updated scratchpad patch is missing some examples of how to setup scratchpad rules ... example

There is an example when you don't have any other patches, ref. config.def.h#L433. I have no plans for adding such an example for every possible rules combination patch :)

I may look at different ways to set rules so that I can add more patches, e.g. floatrules.

another suggestion for swallow patch: option to not swallow floating windows

Yeees, at first I thought I got it, but thinking about it I find that it doesn't make much sense. In order for a window to be floating you have already set up a rule to mark that client as isfloating, so if you don't want that client to be swallowed then you'd also just set noswallow to 1. Anything I'm missing here?

Another thought, if your terminal window is floating - would you expect to swallow a floating window or not?

kronikpillow commented 4 years ago

depends on what is in the terminal, but you are probably right :)

for example, my lf file manager, I want it to be floating, but not to be swallowed, which can be set on isfloating 0 noswallow 1 :) you are correct

kronikpillow commented 4 years ago

hey @bakkeby what happened with the dwmblocks patch? it got removed ?

bakkeby commented 4 years ago

No it's still there.

kronikpillow commented 4 years ago

yeah I figgured it out after I posted the message :D needed more coffee :D :)

I see you made it compatible with statuspadding and awesomebar patch, can you make it compatible with systray as well ? :)

bakkeby commented 4 years ago

It should already be compatible with systray.

kronikpillow commented 4 years ago

nice!

bakkeby commented 4 years ago

I'll just mark this as closed now :)

serhanekicii commented 3 years ago

Making bar-padding and statusmcd compatible is fairly easy.

Check: https://github.com/LukeSmithxyz/dwmblocks/issues/7