Dynamically update the greeter text #279
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #234
Description
Adds new flag:
--greeter-cmd
, which accepts a command name to execute and set the output as the greeter text.This new flag conflicts with
--greeter-text
because the output from the command overrides the variable containing the greeter text passed with--greeter-text
, so they can't be used together.If the indicator is idle, the greeter gets updated every second, if the user is typing, the greeter gets updated at every key press, this could lead to performance issues?
Alternative
The function that updates the greeter text executes the expression passed by
--greeter-cmd
this can lead to erratic behavior if the user isn't careful enough, for example if the user passes the i3lock invocation script as the argument it can lead to a fork bomb.An alternative implementation of this function would be using a temporary file for example
/tmp/i3lock-greeter-text
and updating the greeter text based on the contents of this file. Maybe this would be a better solution?Screenshots/screencaps
In this example I plug the power cord and the battery icon updates:
In the screencap I invoke i3lock with these flags:
Being
lockscreen-greeter
a script which contains:Release notes
Notes: no-notes.