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

[Feature Request] 'Command' applet to respond to file change events rather than time ticks #657

Open
stephenboston opened this issue May 10, 2023 · 5 comments

Comments

@stephenboston
Copy link

Expected behaviour

Panel applet will display the content of a file and update when the content of the file changes. This could be a modification of the 'command' applet to use a watch instead of a timed poll.

Actual behaviour

Current behavior is a timed loop on the command. To display a value that is subject to change I set the command field to 'cat' the file every n seconds where 'n' is an acceptable delay for the update. This can result in frequent unnecessary file io.

Steps to reproduce the behaviour

N/A

MATE general version

Where can I find this?

Package version

mate-desktop 1.26.1-1

Linux Distribution

6.3.1-arch1-1

Link to bugreport of your Distribution (requirement)

@raveit65 raveit65 transferred this issue from mate-desktop/mate-panel Jul 24, 2023
@raveit65
Copy link
Member

Displaying the time is only an easy example command to see an result when you load the applet. The intend of the applet is to display the results of other complex commands.

@stephenboston
Copy link
Author

Understood -- and it works very well. It's an excellent piece.

However it operates through a poll of the command. This means that the applet fires every second at least.

I'm looking for an applet that displays output only when it changes. For example as a response to an inotifywait event.

@raveit65
Copy link
Member

The poll you can adjust with the time in preferences. Ie. for reading a temperature 20-30s are enough.

@raveit65
Copy link
Member

Btw. it should be possible to use the time poll without spamming the log.
I will mark this report as feature request.

@stephenboston
Copy link
Author

Thanks for following up on this.

For example I have a script that looks for changes in network status through the ip monitor service. When there is significant change I post the change to a file that the command applet parses using the cat command.

Even though significant events are rare I want this notice to be timely. Polling the file at acceptable intervals is too often so I want the applet to respond only where there is a change.

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

No branches or pull requests

2 participants