dwl icon indicating copy to clipboard operation
dwl copied to clipboard

The case for a means of tag/mode tracking

Open nuclearfall opened this issue 3 years ago • 3 comments

The bar in dwm indicates a lot of information that is nearly impossible to track otherwise. Is there an easy way to access this information in dwl via the terminal? Tags require there own bar type, which Is why I believe it is included in dwm, but if you have a utility to deliver the information easily to a terminal, it wouldn't be necessary to add a bar and that could be left for someone who doesn't mind another dependency.

nuclearfall avatar Mar 24 '22 13:03 nuclearfall

The info is printed to stdout (or child process' stdin), check printstatus() to see what information is printed.

sevz17 avatar Mar 24 '22 13:03 sevz17

Using waybar and the status information that @Sevz17 mentioned above, you can start dwl like this dwl > "${HOME}/.cache/dwltags"

This script can then be used within a waybar configuration for displaying dwl tag (and layout and active window) status:

There are other ways that others use for displaying tag information.

fauxmight avatar Mar 24 '22 14:03 fauxmight

Yep, this is exactly why the status-to-stdio setup is in place. It should be flexible enough to adapt to any external bar or non-bar you want to use. @nuclearfall is there anything you were looking for that's not handled by consuming printstatus() output?

djpohly avatar Apr 07 '22 13:04 djpohly

@djpohly Regarding adding items to the printstatus() function, I have a patch that adds appid to the fields outputted by printstatus. This is intended to allow external scripts to detect the currently active application so for example the clipboard manager can ignore my password database and libinput gestures can be customised by application. I will be adding this to the patches wiki when I get a chance, but would you be interested in me pushing a pull request to add just the appid output to dwl? No worries if not, it may be too far outside the core functionality.

I would push just the printstatus parts of this patch: https://github.com/djpohly/dwl/commit/62a7eada562db261d6684f4dc0df303f7d0cdec6#diff-f471c124277e21c02d19d16fd4e86287656f1aae579dc7820ff33c9b2403a9a1

bencollerson avatar Jan 30 '23 03:01 bencollerson

@bencollerson Looks very useful. Nice work. Lack of appid tracking outside of sway has long been an annoyance.

Net gain +7 lines? Yes, please! This is a PR worth making and I suspect it would be pushed.

fauxmight avatar Jan 30 '23 14:01 fauxmight

Okay done.

https://github.com/djpohly/dwl/pull/381

appid change only, without the perl script I use to cache title and appid.

bencollerson avatar Jan 30 '23 23:01 bencollerson

@sevz17 all discussions here seem closed resolved already and op hasn't responded in over a year. Can close?

PalanixYT avatar Oct 03 '23 13:10 PalanixYT

@sevz17 all discussions here seem closed resolved already and op hasn't responded in over a year. Can close?

Yup, thanks for the remainder

sevz17 avatar Oct 04 '23 07:10 sevz17