pywalfox: Fails to fetch pywal colors on Mac OS
I set up pywalfox according to the installation guide but Firefox’s theme colors do not change when the “Fetch Pywal colors” button is clicked.
In the browser console I got this: Error: Attempt to postMessage on disconnected port.
Any insight?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (13 by maintainers)
Commits related to this issue
- Potential fix for Frewacom/pywalfox#34, Frewacom/pywalfox#33 and Frewacom/pywalfox#31 — committed to Frewacom/pywalfox-native by Frewacom 4 years ago
Bingo. I had looked before, but must have missed it. I was able to resolve it by opening main.sh and explicitly setting the path to the output of
which pywalfox.For some reason even though when I check any terminal (iTerm2 Terminal.app vscode ) with
which pywalfoxit appears, main.sh does not seem to know where it’s at (maybe?). Thank you for leading me to that though and thanks for you work on this.Edit (Guesses):
I think this has something to do with main.sh using the BASH environment. Since, 10.15 macOS has switched from BASH to ZSH. I am able to work around the issue by sourcing my .zshrc first. then running pywal daemon.
This also might be why sudo works for some people. Because it would put it in the $PATH everywhere (I think). In macOS however installing with sudo doesn’t help because its still a different shell. My guess is that this would work normally on 10.14.
that worked !!! thank you:)
If you wanted something quick and dirty this would probably sort all the macOS users out.
The path variable is contextual on macOS apparently. (https://scriptingosx.com/2018/02/setting-the-path-in-scripts/)
Seems weird that Firefox would not find python, but honestly, I should just create a copy of
main.shduring installation and set the absolute path dynamically. It feels like 90% of the issues people are having would be fixed if I did this. I am not sure why I have put it off for so long.Thanks for the update though, I will look into it 👍
That worked, thank you!!
Yes, zsh and the bash shebang is most likely what is causing issues.
I should skip
main.shcompletely and point to the executable directly in the Firefox manifest. That should eliminate allPATHissues and probably close #31 and #33 as well.