You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generally suggest using = instead of -eq to check the run level since we can't know if "$1" is an integer.
If one tries to run bspwmrc without arguments from the command line (e.g. ~/config/bspwm/bspwmrc), this error will be printed:
dash: dash: 1: [: Illegal number:;
bash: bash: [: : integer expression expected.
If you use = instead of -eq, this error is avoided because [ "" = 0 ] is just false (while [ "" -eq 0 ] will cause the error) and sxhkd still won't run because the check is false.
But why do this change? What's the benefit?
pgrep -x sxhkd > /dev/null || sxhkd & will automatically relaunch sxhkd if you reaload bspwm after sxhkd crashed.
Wanting bspwm to launch sxhkd only on run level 0 is just personal preference in my opinion, what's the point of this change?
The reason I came up with this in the first place is because I noticed there wasn't any example of the run level feature anywhere (or at least I couldn't find it, correct me if I'm wrong!)
I thought making sxhkd use it was a good idea, since it was already in the bspwmrc example.
Thanks for the = vs -eq warning! I'm changing it now!
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
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.
I only now realized we don't have to check if sxhkd is running before starting, if we use the feature from a54ab70.
It also works as an example so more people notice the feature.