Giter Club home page Giter Club logo

pywmtemp's Introduction

PyWMTemp

WindowMaker dockapp for monitoring resources like CPU/GPU temperatures. It supports up to 2 different readings.

wmamixer overview

Requirements

  • Python
  • wmdocklib
  • psutil

Note, that you'll need to install this wmdocklib instead of original pywmdockapps, since the latter works only with Python2.

Installation

For now, use virtualenv:

$ python -m virtualenv venv
$ . venv/bin/activate
(venv) $ pip install .

Usage

You'll need to prepare yaml file with the configuration. And put it in ~/.config/pywmtemp.yaml (or whatever your XDG_CONFIG_HOME points to). For example:

---
readings:
  - sensor: k10temp
    label: Tccd1
    name: cpu
    override_warning: 65
    override_critical: 70
    unit: °C
  - sensor: amdgpu
    label: edge
    name: gpu
    override_warning: 60
    override_critical: 70
    unit: °C

This will look for the two separate temperatures, one for AMD Ryzen CPU, second for Radeon graphic card. Your hardware might vary, see the output of:

$ python -c 'import psutil; import pprint; pprint.pprint(psutil.sensors_temperatures())'

There are six supported keys in the config:

  • sensor - case sensitive sensor name, it corresponds for the keys in dictionary returned by psutil.sensors_temperatures()
  • label - it's a unique label for the sensor reading, all the shwtemp namedtuples should have it. Case sensitive.
  • name - name displayed on the dockapp. It will be uppercased.
  • unit - it should be always °C
  • override_warning - if not set, high value from shwtemp would be used if exists.
  • override_warning - if not set, critical value from shwtemp would be used if exists.

Those last keys will set the threshold when color for the temperature line will change.

By clicking with the left mouse button on the graph region, it will switch between those two readings.

You can create only one entry if you like. If you create more than two entries in config, all above first two will be ignored. You can, however, run multiple instances of this dockapp by passing different configs using --config parameter.

License

This software is licensed under 3-clause BSD license. See LICENSE file for details.

pywmtemp's People

Contributors

gryf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.