Rework launching for user-specified commands. - #2289
Open
blueshiftlabs wants to merge 2 commits into
Open
Conversation
The original `sct` program is not available through many package managers. Its replacement, `xsct`, is more widely available. Since `sct` and `xsct` have (mostly*) compatible command lines, we can use the same `HueShiftDriver` for both by simply telling it to run `sct` or `xsct` respectively. [*] There is a minor difference with the reset behavior - for `sct`, running it with an empty command line resets the color temperature, while for `xsct`, doing so prints usage. Running `[x]sct 0` resets the color temperature for both, so we use that for the `reset` function.
Contributor
Author
|
Note: this PR has already been rebased onto #2288 because that PR fixes an unrelated |
For user-specified commands, such as in the `custom` block, the `cmd` parameter of `[[block.click]]`, and the `if_command` parameter of `[[block]]`, make two changes for consistency: - Always use the user's $SHELL, instead of `sh`, if it's configured. - Pass an environment variable `I3STATUS_RS_PID` with the PID of the launching `i3status-rs` process. This allows custom commands to send signals to the bar without needing to use `pkill`, which may affect other bars running on the system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For user-specified commands, such as in the
customblock, thecmdparameter of
[[block.click]], and theif_commandparameter of[[block]], make two changes for consistency:sh, if it's configured.I3STATUS_RS_PIDwith the PID of the launchingi3status-rsprocess. This allows custom commands to send signals to the bar without needing to usepkill, which may affect other bars running on the system.