Created
October 27, 2016 21:44
-
-
Save kylejohnson/518e9ef84f135ea5f4b48e3d73b50f70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| i3status | while : | |
| do | |
| read line | |
| pbpid=$(pidof pianobar) | |
| if [[ "$pbpid" ]]; then | |
| currentSong=~/.config/pianobar/currentSong | |
| artist=`cut -f 1 -d ',' "${currentSong}"` | |
| song=`cut -f 2 -d ',' "${currentSong}"` | |
| pianobar="${artist} - ${song}" | |
| else | |
| pianobar="Pianobar is not running" | |
| fi | |
| gputemp=$( nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits ) | |
| cputemp=$( sensors coretemp-isa-0000|grep Physical|awk '{print $4}' ) | |
| nastemp=$( ssh nas sudo sg_ses -f --page es /dev/ses0|grep Temperature|grep C|cut -f 2 -d '=' ) | |
| echo "NAS: ${nastemp} CPU: ${cputemp} GPU: ${gputemp}C | ${pianobar} | $line" || exit 1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment