-
Notifications
You must be signed in to change notification settings - Fork 521
The Weather Segment (segments/weather.sh) does not work on MacOS despite using to GNU grep with Perl regular expression enabled #465
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
Comments
Oh that But you are right. This line tmux-powerline/segments/weather.sh Line 97 in 6a651fb
is wrong, should use the configure not the default grep. Additionally these grep usages should use the configure grep as well: tmux-powerline/segments/weather.sh Lines 195 to 196 in 6a651fb
tmux-powerline/segments/weather.sh Lines 227 to 228 in 6a651fb
Looping in @jackdeye for information sharing. If you could make a PR that would be awesome @onlyuuuuu. Maybe you could add a note in the README for the weather segment on how to properly set it up on macOS nowadays. Usually I'm on a mac system but for the last and comming months I'm not, so I can't check myself. |
Oh I forgot the most obvious approach: the best thing would of course be to rewrite all I would say this is the better approach! |
Yep, totally agree, I'm writing up a fix now |
Desc
I'm on my Mac M1 and I was trying to setup my TMUX powerline with my own configurations according to the documentation. Everything goes well until one the segments, which is the
weather.sh
segment does seem to loaded up, no outputting text, just a small gap with blank content.Upon further investigation, I've noticed that I'm using an unsupported
grep
with no-P
(Perl expression support). Which isgrep (BSD grep, GNU compatible) 2.6.0-FreeBSD
. This is expected and have been mentioned in the documentation.The solution will be to set the variable
TMUX_POWERLINE_SEG_WEATHER_GREP=ggrep
in myconfig.sh
file since I'm using Homebrew and haveggrep
installed, which is the GNU Grep and supported the-P
(Perl expression support). However, the settings never get applied due to the implementation never applies the value of the variable and used it.Proposals
The fix to this should be applied on line
97
fromto
Other Proposals/Issues
On debugging and setting up the Weather segment. I've also found some other minor problems, such as:
Should be
stat
command on line83
doesn't work since we've sourced the CoreUtils stuff over the FreeBDS stuff (by writting it at the beginning of
$PATH
). So I have to do a workaround and added an entry inconfig.sh
to something like thisJust to get Powerline to use the FreeBDS
stat
command. Maybe fixing this won't ideal, but something/tips mentioned in the docs might be useful for pp that might or have ran into this problem like me. Just to save up hours of debugging.auto
. There's a chance that you might get API rate limiting onhttps://ipapi.co/json
. So there's nothing you can do about it by manually setting the actual coordinates.Last words
Thank you for all the pp that maintains such a great project and I love every bit of it. Debugging and troubleshooting this has been a fun experience for me. This is my first ever GitHub issues that I've ever submitted to any projects so sorry for the words, I didn't mean to offend anybody. I can cook up a PR if possible.
The text was updated successfully, but these errors were encountered: