Skip to content
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

Temperature indicator #244

Open
dessalines opened this issue May 10, 2019 · 6 comments
Open

Temperature indicator #244

dessalines opened this issue May 10, 2019 · 6 comments

Comments

@dessalines
Copy link

I found a really good, easy way to do a temperature indicator:

#(acpi -tf | cut -d " " -f 4)°F

This could be added.

@gpakosz
Copy link
Owner

gpakosz commented May 10, 2019

Hello @dessalines 👋

Since this configuration is cross platform, a temperature segment would have to work for Windows, Linux, macOS, FreeBSD, OpenBSD, ...

In the meantime I'm sure you discovered you can add that to your own ~/.tmux.conf.local copy.

@dessalines
Copy link
Author

I did, thanks. It might be useful for anyone who does a search for temperature wanting to add this.

Have you considered adding commented out sections, or readme additions for useful things like this? It might be helpful for others wanting to do the same for linux.

@gpakosz
Copy link
Owner

gpakosz commented May 10, 2019

Well, commented out sections or mentions in README are possible but double-edged.

The next thing people will do is opening an issue and ask me how they can achieve the same as X on Y 😅

@dessalines
Copy link
Author

I leave it to your discretion. If it were me, I'd use the readme, and add sections for weather like you have now, and add things like CPU temp, HW Status, and whatever anyone else wanted to add, and different ways to do it for different platforms. I could do a PR for this if you'd like.

@gpakosz
Copy link
Owner

gpakosz commented May 10, 2019

The difference with the weather example is that it's curl based (curl is available on any OS and is mostly installed by default) and doesn't require an API key.

As such it doesn't take support effort from my part.
Thanks for the PR offer but for now I prefer letting people land on issues after a search and realize they can still do things on their own just like with regular tmux.

@bluedepth
Copy link

I'm glad I found this comment, it led me to figuring out how to include temp on my Raspberry Pi 4. It could probably be done more elegantly, but here's how I did it:
I've got a shell script that I use to report the temperature to me via pushover.app. It's called temp.sh:
(I found the script here: https://forums.raspberrypi.com/viewtopic.php?t=180647)
#!/bin/bash
cpu=$(</sys/class/thermal/thermal_zone0/temp)
cpuf=$(echo "(1.8 * $cpu) + 32" |bc)
echo "$cpuf'F"

Saved that to /home/pi as temp.sh, made it executable, then in .tmux.conf.local adapted what was above:
On tmux_conf_theme_status_right, just to the left of the clock entry, #(/home/pi/temp.sh), then saved it, source-file .tmux.conf and it's exactly what I was looking for.

LOL, yes, I know, ugh, Farhenheit. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants