daskeyboard / q-marketplace

8 stars 0 forks source link

New Applet: ICMP Ping #7

Closed Conroman16 closed 5 years ago

Conroman16 commented 5 years ago

I've made an ICMP ping applet to display response times as a color gradient from green to red, and I'd like to submit it to the marketplace. It can be found here: https://github.com/Conroman16/daskeyboard-applet--icmp-ping

I hope you like it!

Conroman16 commented 5 years ago

I've refactored things a bit to allow configuration of pretty much everything that defines how the applet functions, and have included what I believe to be reasonable defaults for these parameters. I've also bumped the version to 1.1.0.

I suppose I should also mention why I built this in the first place: I deal with a few services where I'm interested in knowing the latency of the connection between my network and theirs, and I thought having that display on a single key as a color that changes depending on the duration of the ping RTT would be a perfect use of my new DasKeyboard. Since there weren't any other apps that did ICMP pinging, I figured it would be worth it to write a simple one and let the community have access to it

fabiendv commented 5 years ago

You should received a pull request soon. I have updated some details and changed the version of your applet to 1.1.1.

We published this version (1.1.1) of your contribution to the Q marketplace. For future development, we would recommend to have a new version using a different type of input for the color (as described here) instead of using hexadecimal value.

Conroman16 commented 5 years ago

Thank you!! I merged the PR and created a corresponding v1.1.1 tag in my repo.

As for the color configuration, I really like the idea of using the color question, however I would need array functionality (like textbox + "isArray": true) to make it work properly with the applet's current color-handling model. I designed the algorithm in such a way that if the end user adds more colors to the array, they get more gradient steps. Might that color array question functionality be something that is available or coming soon in the daskeyboard-applet library?

I suppose another option would be to use a color library to dynamically-generate the gradient steps, and then the end user would only need to specify start and stop colors for the gradient.

What are your thoughts @fabiendv?

fabiendv commented 5 years ago

We don't currently have a plan for supporting the array configuration for the color input. I would say that the best way is to use a color library. Also, instead of choosing two colors with hexadecimal values and create a gradient between the 2, you can use only one in your configuration to make it simpler (with the color picker) and hard-code the color change towards a hard-coded color (like red). In addition, you could also use the effect configuration feature (e.g. blink), and apply it when the ping is very slow (exceeds the top threshold).