Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to display simple info about the layout state. #21

Open
hfytr opened this issue Nov 28, 2024 · 1 comment
Open

A way to display simple info about the layout state. #21

hfytr opened this issue Nov 28, 2024 · 1 comment
Labels
feature New feature or request

Comments

@hfytr
Copy link

hfytr commented Nov 28, 2024

Missing behavior

Hello, I would like to add a few commands which display information related to the current layout, specifically the current count / wide-count. This would be very helpful for making custom waybar modules.

Desired solution

Perhaps the wideriver binary (or a separate binary) could have a --print-count flag for example. This would work pretty well, and i imagine would be quite simple to implement.

Ideas

No response

@hfytr hfytr added the feature New feature or request label Nov 28, 2024
@alex-courtis
Copy link
Owner

alex-courtis commented Nov 29, 2024

That's a great idea!

There's currently an undocumented "feature" that will display the count and ratio, when you're running with --log-threshold debug. It sounds like it may not match your use, however if it does we could make it a first class feature.

20241130_083557

We can definitely add commands to do this. Something like

--get-count
--get-ratio

riverctl send-layout-cmd wideriver "--get-count"

We could also add the layout and stack for completeness.

Edit: there does not appear to be a means to return any sort of output string from a layout command.

The simplest course of action may to add a user defined layout strings, defined at startup. Perhaps something like:

--layout-name-wide 'H H $count'
--layout-name-left '$count I H $ratio'

printf format strings should not be used for security.

Waybar could simply show the layout string, process via a regex, or the user could implement a custom module.

Pull Requests are most gratefully appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants