Closed mayersj1 closed 5 months ago
Hello @mayersj1 👋
That or I could specifically call /usr/sbin/sysctl
when on macOS.
Not sure which is better at that point.
Can you please give the gh-716
branch a try? And maybe comment the changes?
So I've verified that the changes to uptime and loadavg work properly on MacOS Sonoma 14.3. Did you want me to comment the code and submit a PR or just note the differences here? Sorry, a little confused as to what you'd like me to do. Thanks!
I removed -q
and directed stderr
to /dev/null
. That should do it.
I'm about to merge that change now, thanks for testing!
Sure thing! All working well!
I'm now curious about why Nix does what it does
When using nix on MacOS, a sysctl binary is installed in the users .nix-profile space that is present in the PATH before /usr/sbin/sysctl. This sysctl does NOT support the -q option. This results in the uptime display of the status bar to show 54y 48d 16h 39m (much like closed issue #501).
I've verified that if we drop the '-q' arg for *Darwin check in the .tmux.conf, the uptime output is properly displayed.
Would it be possible to just drop the '-q' arg for MacOS? This will allow the uptime to work properly with either sysctl binary.