Results 1 to 6 of 6

Thread: Conky Sensors in Fahrenheit

  1. #1
    Join Date
    Jun 2011
    Beans
    4

    Conky Sensors in Fahrenheit

    I am using conky with the code:

    ${exec sensors | grep 'temp1' | cut -c15-16}°C / ${exec sensors | grep 'temp1' | cut -c32-36 }

    This displays the current and critical temperature of the CPU in celcius/centigrade. How would i change that to fahrenheit without messing up the way that it looks on my desktop?

  2. #2
    Join Date
    Apr 2008
    Location
    Hawaii
    Beans
    174
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Conky Sensors in Fahrenheit


  3. #3
    Join Date
    Aug 2008
    Location
    Arizona State
    Beans
    419
    Distro
    Ubuntu

    Re: Conky Sensors in Fahrenheit

    to get mine working I had to install lmsensors and I wrote a script that I execi in my conkyrc.

    Code:
    sensors -f | grep -A 1 'temp1' | cut -c15-25 | sed '/^$/d' | awk '{ print $1 }'

  4. #4
    Join Date
    Aug 2008
    Location
    Arizona State
    Beans
    419
    Distro
    Ubuntu

    Re: Conky Sensors in Fahrenheit

    execute that command in terminal. It should print your CPU temp. if it works for you, save is as a .sh file and then call that script in your .conkyrc

    ${execi 2 /home/user/temp.sh}

  5. #5
    Join Date
    Jun 2011
    Beans
    4

    Re: Conky Sensors in Fahrenheit

    Thanks for helping! but, i already figured it out.

    ${exec sensors | grep 'temp1' | cut -c15-16 | awk '{print ($1*9)/5+32}'}

  6. #6
    Join Date
    Aug 2008
    Location
    Arizona State
    Beans
    419
    Distro
    Ubuntu

    Re: Conky Sensors in Fahrenheit

    glad you figured it out! not all boards support output using temp1. the weird thing about my script is that on three computers in my house it works perfectly, but on my other laptop, it prints two outputs. I can't figure that one out for the life of me.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •