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

Enhancement: Add an entry to each category to run an external command #52

Open
fedkad opened this issue Feb 4, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@fedkad
Copy link

fedkad commented Feb 4, 2024

Is it technically possible to add a new feature like this?

Add an entry for each category (by category I mean the Processors, Memory, Storage, Network, and Sensors) menu where the user will be able to give a Title (for the menu item to be added, preferably at the bottom of the relevant category's menu) and a command. When the user moves the mouse over that menu item, Astra Monitor will run the user-specified external command, capture its output, make necessary truncation if the output is too long or wide, and display it as a pop-up window. That is more or less similar to what happens when I hover the mouse over the CPU name at the top of the Processors menu and a pop-up window is displayed with the contents of the lscpu command's output.

Standard error of the command may be captured for error and warning logging purposes. Actually, I don't know where Astra Monitor logs the errors, but I presume it is syslog.

The external command should be able to run and terminate normally (with 0 exit) quickly, say in less than half of the refresh time (Update frequency in Astra Monitor terminology) and if so, Astra Monitor should call it once per refresh time; otherwise Astra Monitor should kill it and stop calling it again until the next time the user hovers the mouse over that menu item.

I am planning to use this feature for monitoring the status of some GUI processes, etc.

@fedkad fedkad changed the title Enhancement: Add an entry to each category to run external command Enhancement: Add an entry to each category to run an external command Feb 4, 2024
@ljuzig
Copy link
Collaborator

ljuzig commented Feb 6, 2024

This is somewhat similar to what's being asked in #34. I have conducted some preliminary tests on a way to allow the user to add custom commands and display results in the menu. It's feasible, and I'm going to include this in a future version. However, you'll have to wait until we reach the beta phase, which is expected to occur sometime in February.

@ljuzig ljuzig added the enhancement New feature or request label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants