You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked briefly, so I might have missed it, but I can't find a way to add a format_alt to the external_ip block via the config. I suppose that means it needs to be added explicitly via the block code. That being said, I wonder if it would be more versatile to have add a format_alt in the core block code, and have a click handler to switch to it for all blocks, rather than only those that have it explicitly defined.
I understand other blocks such as notify have different behavior on left click, but I hope it should be possible to override the behavior in their code, and also modify it with the click config without any conflict.
Additionally, it might also be nice to be able to use the scroll wheel to iterate through all the initialized (or configured) values available to the format code, and similarly override the scroll wheel behavior used in blocks like volume. So, for example, scrolling on external_ip would cycle through a format_list value containing: ["ip", "version", "city", "region", "region_code", "..."] by default. The user could configure format_list to trim it down to only those relevant to them, eg:
[[block]]
block = "external_ip"
format = "$ip"
format_list = ["$ip","$city","$asn"]
P.S. Thank you for everyone's ongoing effort to improve the project. Every few months when I revisit my config and the release notes, there's always an improvement I appreciate.
The text was updated successfully, but these errors were encountered:
I don't think that we'd want to make every block have an alt format or list of formats. For example take a look at the pomodoro block which has several states in which clicking/scrolling have different actions.
Shall I change the request to only modify external_ip then? I suggested the change as a default because most blocks appear to follow the same pattern, while the interactive ones are more of an exception. Looking closer, there probably isn't much benefit, and might actually complicate existing code rather than simplify it.
I'm sure some of the other non-interactive would benefit from having an alt format option. Instead of a format list option though mayt it would be better to allow a single or list of alt formats so that we don't need to set both.
The clock block may be interesting to you check out to see how we added the ability to display different timezones. While it's not actually a different format it's similar in concept.
I looked briefly, so I might have missed it, but I can't find a way to add a
format_alt
to theexternal_ip
block via the config. I suppose that means it needs to be added explicitly via the block code. That being said, I wonder if it would be more versatile to have add aformat_alt
in the core block code, and have a click handler to switch to it for all blocks, rather than only those that have it explicitly defined.I understand other blocks such as
notify
have different behavior on left click, but I hope it should be possible to override the behavior in their code, and also modify it with the click config without any conflict.Additionally, it might also be nice to be able to use the scroll wheel to iterate through all the initialized (or configured) values available to the
format
code, and similarly override the scroll wheel behavior used in blocks likevolume
. So, for example, scrolling onexternal_ip
would cycle through aformat_list
value containing:["ip", "version", "city", "region", "region_code", "..."]
by default. The user could configureformat_list
to trim it down to only those relevant to them, eg:P.S. Thank you for everyone's ongoing effort to improve the project. Every few months when I revisit my config and the release notes, there's always an improvement I appreciate.
The text was updated successfully, but these errors were encountered: