If you set the @dracula-fixed-location to "San Diego, California" it
ends up looking at "San" which is somewhere in South Korea. This occurs
for any fixed-location that has a space. Something like
"Portland, Oregon" can be modified to "Portland,Oregon" and still work
but we can't remove the space from "San Diego". The reason that spaces
in the fixed location break the backend request is that dracula.sh loses
everything after the space.
Q: Why does the fixed-location end up as "San"?
A: In dracula.sh the fixed-location is not wrapped in quotes when
embedded in the status-right string.
A: In weather_wrapper.sh the call to weather.sh does not wrap the
fixed-location argument with quotes.
Q: When these are fixed why do we get a broken link?
A: Since we are calling a web service using a url, we need to escape
the spaces by changing them to %20
The system_profiler command used to determine the total memory on darwin
systems performs an "Activation Lock" check. This can produce a delay in
returning total memory. I began experiencing delays of around 10 seconds.
Switching from system_profiler to sysctl to calculate total memory
bypasses the "Activation Lock" check / timeout scenario.
Results of "time" command using system_profiler:
system_profiler SPHardwareDataType 0.17s user 0.23s system 3% cpu 10.165 total
grep -a "Memory:" 0.00s user 0.00s system 0% cpu 10.164 total
awk '{print $2 $3}' 0.00s user 0.00s system 0% cpu 10.163 total
Results of "time" command using sysctl:
sysctl -n hw.memsize 0.00s user 0.00s system 83% cpu 0.004 total
awk '{print $0/1024/1024/1024 " GB"}' 0.00s user 0.00s system 86% cpu 0.004 total
Shows user and hostname of active ssh session if any in the current tmux pane. Connected port
is also available to show under configuration option (default false)