SbarLua
SbarLua copied to clipboard
Accessing environment variables
Hi thank you so much for everything. I am unsure weather I am doing something wrong or not. I am trying to create a weather widget and in it I am trying to use an environment variable and I am not able to get anything back from it.
I even tried to do something like os.getenv("WEATHER_API_KEY") in a label and it does not work whereas something like os.getenv("PATH") does work.
I then created a test.lua file with a single line print(os.getenv("WEATHER_API_KEY")) and ran lua test.lua and it worked.
Probably just me being to much of a numpty or not knowing where to look in case sketchybar only has access to certain env vars and not others.