--- layout: project title: py-text-monitor short: pytextmonitor description: Minimalistic Plasmoid script that looks like widgets in Awesome WM hasgui: true developers: - Evgeniy Alelseev license: GPLv3 links: - Plasmoid page on kde-look.org - DataEngine page on kde-look.org - Archlinux AUR package ---

## Information

A minimalistic Plasmoid script written on `Python2`. It looks like widgets in Awesome WM. My plasmoid is highly and easily configurable and does not clutter your KDE system. Also this packages has an additional DataEngine written on `CPP` (old version was written on `Python2`).

NOTE: LOOKING FOR TRANSLATORS!

### Developers and contributors

{% for devel in page.developers %}
- {{ devel }}
{% endfor %}

### License

- {{ page.license }}

## Installation

### Instruction

- Download an archive with latest version of source files.

- Extract it and install:

  {% highlight bash %} cd /where/is/applet/ mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` ../ make make install {% endhighlight %}

  For global isntallation type:

  {% highlight bash %} cd /where/is/applet/ mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../ make sudo make install {% endhighlight %}

### Dependencies

I want note that all were tested on latest version of dependencies.

- kdebase-workspace
- kdebindings-python2
- automoc4 (make)
- cmake (make)
- kdebase-runtime (make)
- lm_sensors (optional, for definition temperature device)
- sysstat (optional, for notification)
- hddtemp (optional, for HDD temperature monitor)
- one of supported music player - amarok, mtd or qmmp (optional, for music player monitor)
- proprietary video driver (optional, for GPU monitor)

## How to use

Open your Plasma widgetes and select `Py Text Monitor`.

## Configuration

### DataEngine configuration

You may edit DataEngine configuration. It is `/usr/share/config/extsysmon.conf` or `$HOME/.kde4/share/config/extsysmon.conf` depending on the type of installation. Uncomment needed line and edit it.

#### DataEngine options

GPUDEV | Set GPU device. May be `nvidia` (for nVidia), `ati` (for ATI Radeon), `ignore` or `auto`. Default is `auto`.
HDDDEV | Set block device for `hddtemp` comma separated or use `all`. Default is `all`.
MPDADDRESS | MPD host address. Default is `localhost`.
MPDPORT | MPD host port. Default is `6600`.
CUSTOM | Custom command to run. Default is `wget -qO- http://ifconfig.me/ip`.

### Widget configuration

For edited output you must open Settings window and setup output format in lines. Label order will changed if you change slider position. HTML tags in label work normally.
NOTE You do not may set to show `$cpu` in swap label for example. `$cpu` will work only in cpu label.

Available flags are in the table below.
NOTE The numbering of all arrays in variables starts at 0.

Time label | `$time` | Time in default format. For example, `fri Nov 6 04:48:01 2013`.
`$isotime` | Time in ISO format.
`$shorttime` | Time in short locale format.
`$longtime` | Time in long locale format.
`$custom` | Will enable custom time format.
Uptime label | `$uptime` | System uptime, `---d--h--m`.
`$custom` | Will enable custom uptime format.
CPU label | `$cpu` | Total load CPU, %, `-----`.
`$cpuN` | Load CPU for core N, %, `-----`. N should be in range 0 to 8.
CPU clock label | `$cpucl` | Average CPU clock, MHz, `----`.
`$cpuclN` | CPU clock for core N, MHz, `----`. N should be in range 0 to 8.
Temperature label | `$tempN` | Temperature for device N, °C, `----`. For example, `$temp0`.
GPU label | `$gpu` | GPU usage, %, `-----`. `aticonfig` or `nvidia-smi` must be installed.
GPU temperature label | `$gputemp` | GPU temperature, °C, `----`. `aticonfig` or `nvidia-smi` must be installed.
Memory label | `$mem` | Memory usage, %, `-----`.
`$memmb` | Memory usage, MB, `-----`.
Swap label | `$swap` | Swap usage, %, `-----`.
`$swapmb` | Swap usage, MB, `-----`.
HDD usage label | `$hddN` | Usage for mount point N, %, `-----`. For example `$hdd0`.
HDD temperature label | `$hddtempN` | Temperature for HDD N, °C, `----`. For example `$hddtemp0`. `hddtemp` must be installed.
Network label | `$down` | Download speed, KB/s, `----`.
`$up` | Upload speed, KB/s, `----`.
`$netdev` | Current network device.
Battery label | `$bat` | Battery charge, %, `---`.
`$ac` | Status of AC device. Returns `(*)` if AC device is online or `( )` if offline.
Music player label | `$album` | Current song album. One of supported music players must be installed.
`$artist` | Current song artist. One of supported music players must be installed.
`$progress` | Current song progress. One of supported music players must be installed.
`$time` | Current song duration. One of supported music players must be installed.
`$title` | Current song title. One of supported music players must be installed.
Custom label | `$custom` | Get output from custom command.

#### Advanced settings

Custom time format:

`$dddd` | Weekday in long format.
`$ddd` | Weekday in short format.
`$dd` | Day.
`$d` | Day without zero.
`$MMMM` | Month in long format.
`$MMM` | Month in short format.
`$MM` | Month.
`$M` | Month without zero.
`$yyyy` | Year.
`$yy` | Year in short format.
`$hh` | Hours.
`$h` | Hours without zero.
`$mm` | Minutes.
`$m` | Minutes without zero.
`$ss` | Seconds.
`$s` | Seconds without zero.

Custom uptime format:

`$ds` | Uptime days.
`$hs` | Uptime hours.
`$ms` | Uptime minutes.

Temperature devices: List of devices, which will be observed in temperature label (combo box items come from `sensors`). List widget is editable, delete key will remove current item.

Mount points: List of mount points, which will be observed in HDD label (combo box items come from `mount`). List widget is editable, delete key will remove current item.

HDDs: List of hard disk devices, which will be observed in HDD temperature label (combo box items come from `find`). List widget is editable, delete key will remove current item.

Network directory: Path to directory, which contains network devices information. Default is `/sys/class/net`. It is required for auto select of network device.

Network device: Use specified device as active. Combo box items come from network directory. This option will disable auto select network device.

Battery device: File with battery information. The file (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.

AC device: File with AC information. The file (`/sys/class/power_supply/AC/online` by default) should contain `1` if AC is online.

Music player: Select one of supported music playes for player label.

#### Tooltips

Since version 1.7.0 CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make the needed checkboxes a fully checked. The number of stored values can be set in the tab. Colors of graphs are configurable too.

#### DataEngine settings

GPU device: Select one of supported GPU devices. `auto` will enable auto selection. Default is `auto`.

HDD: Select one of HDDs for HDD temperature monitor. `all` will enable monitor for all devices. Default is `all`.

MPD address: Address of MPD server. Default is `localhost`.

MPD port: Port of MPD server. Default is `6600`.

Custom command: NOTE this label may cause the computer freeze. A command, which will be run for custom label. For example, `wget -qO- http://ifconfig.me/ip` will return external IP.

## Graphical user interface

## Screenshots

Widget (clickable):
Configuration window: