update aw page

This commit is contained in:
2024-04-20 15:22:24 +03:00
parent 3411bf74d2
commit 952b1d707f
2 changed files with 115 additions and 242 deletions

View File

@ -29,10 +29,7 @@ links:
---
<!-- info block -->
A collection of minimalistic easily configurable Plasmoids written on `C++/Qt`,
which look like widgets in [Awesome WM](//awesome.naquadah.org/ "Awesome Homepage").
Also it provides additional system [DataEngine]
(//techbase.kde.org/Development/Tutorials/Plasma/DataEngines "Developers tutorial").
A collection of minimalistic easily configurable Plasmoids written on `C++/Qt`, which look like widgets in [Awesome WM](//awesome.naquadah.org/ "Awesome Homepage"). Also it provides additional system [DataEngine](//techbase.kde.org/Development/Tutorials/Plasma/DataEngines "Developers tutorial").
<!--more-->
@ -68,31 +65,26 @@ Special thanks:
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
* Download an [archive](//github.com/arcan1s/awesome-widgets/releases "GitHub")
with latest version of source files.
* Download an [archive](//github.com/arcan1s/awesome-widgets/releases "GitHub") with latest version of source files.
* Extract it and install:
```bash
cd /where/is/applet/
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../
make
sudo make install
cmake -B build -S sources -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build
```
**NOTE:** on Plasma 5 it very likely requires `-DKDE_INSTALL_USE_QT_SYS_PATHS=ON`
flag.
### <a href="#dependencies" class="anchor" id="dependencies"><span class="octicon octicon-link"></span></a>Dependencies
I want note that all were tested on latest version of dependencies.
* plasma-framework
* plasma-workspace
* cmake *(make)*
* extra-cmake-modules *(make)*
* hddtemp **or** smartmontools *(optional, for HDD temperature monitor)*
* one of supported music player *(optional, for music player monitor)*
* proprietary video driver *(optional, for GPU monitor)*
* udev *(optional, GPU features)*
* wireless_tools *(optional, WiFi information)*
<!-- end of install block -->
@ -103,8 +95,7 @@ Open your Plasma widgets and select `Awesome Widget`.
### <a href="#tips" class="anchor" id="tips"><span class="octicon octicon-link"></span></a>Tips & tricks
You may use different colours inside. Just put label text into html code. See
[issue](//github.com/arcan1s/awesome-widgets/issues/9 "GitHub") for more details.
You may use different colours inside. Just put label text into html code. See [issue](//github.com/arcan1s/awesome-widgets/issues/9 "GitHub") for more details.
<!-- end of howto block -->
@ -122,9 +113,6 @@ edit it.
| | |
|----------|-----------|
| ACPIPATH | Path to ACPI devices. Default is `/sys/class/power_supply/`. |
| GPUDEV | Set GPU device. May be `nvidia` (for nVidia), `ati` (for ATI Radeon), `disable` or `auto`. Default is `auto`. |
| HDDDEV | Set block device for `hddtemp` comma separated or use `all`. `disable` will disable HDD temperature monitor. Default is `all`. |
| HDDTEMPCMD | A command which will be run for hddtemp DataEngine. Default is `sudo hddtemp`. Supported applications are `hddtemp` and `smartmontools`. |
| MPDADDRESS | MPD host address. Default is `localhost`. |
| MPDPORT | MPD host port. Default is `6600`. |
| PLAYER | Set music player. Supported players are mpd and MPRIS/DBus supported. `disable` will disable this monitor. |
@ -132,8 +120,7 @@ edit it.
### <a href="#widconf" class="anchor" id="widconf"><span class="octicon octicon-link"></span></a>Widget configuration
To edit output you need open Settings window and specify output format. HTML
tags work normally.
To edit output you need open Settings window and specify output format. HTML tags work as expected.
Available flags are in the table below.
@ -157,8 +144,9 @@ Available flags are in the table below.
| `$cpucl` | Average CPU clock, MHz, `----`. | 1.1.2 |
| `$cpuclN` | CPU clock for core N, MHz, `----`. | 1.7.0 |
| `$tempN` | Temperature for device N, `----`. For example, `$temp0`. ||
| `$gpu` | GPU usage, %, `-----`. `aticonfig` or `nvidia-smi` must be installed. | 1.3.2 |
| `$gputemp` | GPU temperature, `----`. `aticonfig` or `nvidia-smi` must be installed. | 1.3.2 |
| `$gpu` | GPU usage, %, `-----`. Requies `udev` to be installed. | 1.3.2 |
| `$gpuN` | GPU usage for device N, %, `-----`. For example, `$gpu0`. Requies `udev` to be installed. | 4.0.0 |
| `$gputempN` | GPU temperature for device N, `----`. For example, `$gputemp0`. Requies `udev` to be installed. | 4.0.0 |
| `$mem` | Memory usage, %, `-----`. ||
| `$memmb` | Memory usage, MB, `-----`. | 1.1.1 |
| `$memgb` | Memory usage, GB, `----`. | 1.7.3 |
@ -184,7 +172,6 @@ Available flags are in the table below.
| `$hddtotgbN` | Total size of mount point N, GB, `-----`. For example `$hddtotgb0`. | 1.10.0 |
| `$hddrN` | Read speed of disk N, KB/s, `-----`. For example `$hddr0`. | 1.9.0 |
| `$hddwN` | Write speed of disk N, KB/s, `-----`. For example `$hddw0`. | 1.9.0 |
| `$hddtempN` | Temperature for HDD N, `----`. For example `$hddtemp0`. `hddtemp` or `smartmontools` must be installed. | 1.7.0 |
| `$down` | Download speed for active device, KB/s or MB/s, `----`. | 1.7.0 |
| `$downkb` | Download speed for active device, KB/s, `----`. | 3.0.0 |
| `$downunits` | Download speed units for active device, `----`. | 3.0.0 |
@ -207,7 +194,15 @@ Available flags are in the table below.
| `$uptotalkbN` | Total transmitted for device N, KB, `----`. | 3.1.2 |
| `$netdev` | Current network device. | 1.1.1 |
| `$bat` | Average battery charge, %, `---`. ||
| `$batN` | Battery N charge, %, `---`. | 2.0.3 |
| `$batN` | Battery N charge, %, `---`. For example `$bat0`. | 2.0.3 |
| `$batleft` | Battery discharge time, s, `---`. | 3.4.2 |
| `$batleftN` | Battery N discharge time, s, `---`. For example `$batleft0`. | 3.4.2 |
| `$batnow` | Battery current capacity, `---`. | 3.4.2 |
| `$batnowN` | Battery N current capacity, `---`. For example `$batnow0`. | 3.4.2 |
| `$batrate` | Battery discharge rate, 1/s, `-----`. | 3.4.2 |
| `$batrateN` | Battery N discharge rate, 1/s, `-----`. For example `$batrate0`. | 3.4.2 |
| `$battotal` | Battery total capacity, `---`. | 3.4.2 |
| `$battotalN` | Battery N total capacity, `---`. For example `$battotal0`. | 3.4.2 |
| `$ac` | Status of AC device. Returns `(*)` if AC device is online or `( )` if offline. ||
| `$album` | Current song album. One of supported music players must be installed. | 1.5.3 |
| `$dalbum` | Current song album with fixed symbols count shown as a running line. | 3.0.0 |
@ -240,15 +235,16 @@ Available flags are in the table below.
| `$percaskchgN` | Get price change for ticker N, %. For example `$percpricechg0`. | 2.2.2 |
| `$weatherIdN` | Numerical weather ID. For example `$weatherId0`. | 2.4.0 |
| `$weatherN` | Weather status. For example `$weather0`. | 2.4.0 |
| `$humidityN` | Humidity, %. For example `$humidity0`. | 2.4.0 |
| `$pressureN` | Pressure, bars. For example `$pressure0`. | 2.4.0 |
| `$temperatureN` | Temperature. For example `$temperature0`. | 2.4.0 |
| `$humidityN` | Humidity, %, `---`. For example `$humidity0`. | 2.4.0 |
| `$pressureN` | Pressure, bars, `-----`. For example `$pressure0`. | 2.4.0 |
| `$temperatureN` | Temperature, `-----`. For example `$temperature0`. | 2.4.0 |
| `$brightness` | Screen brightness, %, `---` | 3.4.2 |
| `$volume` | System volume, %, `---`. | 3.4.2 |
| `$ssid` | Current WiFi ssid. `wireless_tools` must be installed. | 4.0.0 |
### <a href="#lambda" class="anchor" id="lambda"><span class="octicon octicon-link"></span></a>Lambda and template functions
Since version 3.0.0 the main widget supports lambda functions, which are
calculated at runtime. It may be declared by using `{% raw %}${{{% endraw %}
{% raw %}}}{% endraw %}` construction:
Since version 3.0.0 the main widget supports lambda functions, which are calculated at runtime. It may be declared by using `{% raw %}${{{% endraw %} {% raw %}}}{% endraw %}` construction:
```javascript
{% raw %}${{{% endraw %}
@ -260,8 +256,7 @@ three()
{% raw %}}}{% endraw %}
```
A functions inside will be interpreted as JavaScript ones, any variables from main
body is supported, thus the following function:
A functions inside will be interpreted as JavaScript ones, any variables from main body is supported, thus the following function:
```javascript
{% raw %}${{{% endraw %}
@ -276,8 +271,7 @@ colorCpu()
{% raw %}}}{% endraw %}
```
will show `$cpu` value in red if it is more than 90.0, otherwise it will be shown
in default colour. Any calculations are also supported:
will show `$cpu` value in red if it is more than 90.0, otherwise it will be shown in default colour. Any calculations are also supported:
```javascript
{% raw %}${{{% endraw %}
@ -285,10 +279,7 @@ $down - $up
{% raw %}}}{% endraw %}
```
will show difference between download and upload speed. Another feature provided
by lambda functions is `$this` value which returns the last value of the lambda
function. Here is a little more complicated example which will show running line
"Artist - Title" with length less or equal than 20 symbols:
will show difference between download and upload speed. Another feature provided by lambda functions is `$this` value which returns the last value of the lambda function. Here is a little more complicated example which will show running line "Artist - Title" with length less or equal than 20 symbols:
```javascript
{% raw %}${{{% endraw %}
@ -304,14 +295,9 @@ runningLine()
{% raw %}}}{% endraw %}
```
Thus this feature may be used for example to show any custom values which will
be calculated in runtime and to show different information depending on some
conditions. But please keep in mind that such runtime calculation may increase
CPU load.
Thus this feature may be used for example to show any custom values which will be calculated in runtime and to show different information depending on some conditions. But please keep in mind that such runtime calculation may increase CPU load.
Another feature which has been introduced with 3.1.0 is templates. It works in
the same way as lambda functions, but they are calculated only once (at the start),
e.g.:
Another feature which has been introduced with 3.1.0 is templates. It works in the same way as lambda functions, but they are calculated only once (at the start), e.g.:
```javascript
{% raw %}$template{{{% endraw %}
@ -327,13 +313,7 @@ will always show `3` and will not be calculated each time.
### <a href="#functions" class="anchor" id="functions"><span class="octicon octicon-link"></span></a>Special functions
To allow some features with lambdas and templates several internal functions
have been introduced with 3.1.0. They have the same syntax:
`$aw_function<args>{% raw %}{{{% endraw %}body{% raw %}}}{% endraw %}`.
where args may be optional. If there are several args they should be comma
separated. If you want to pass comma as arg use `$,`. If you want to use double
brackets inside body screen them by using `$`, e.g. `${`. Functions will be called
once and before any actions.
To allow some features with lambdas and templates several internal functions have been introduced with 3.1.0. They have the same syntax: `$aw_function<args>{% raw %}{{{% endraw %}body{% raw %}}}{% endraw %}`, where args may be optional. If there are several args they should be comma separated. If you want to pass comma as arg use `$,`. If you want to use double brackets inside body screen them by using `$`, e.g. `${`. Functions will be called once and before any actions.
| Function | Description | Args | Body |
|----------|-------------|------|------|
@ -346,8 +326,7 @@ once and before any actions.
### <a href="#advanced" class="anchor" id="advanced"><span class="octicon octicon-link"></span></a>Advanced settings
**Enable background:** Uncheck to disable default background and set transparent
one. Default is `true`.
**Enable background:** Uncheck to disable default background and set transparent one. Default is `true`.
**Translate strings:** Translate strings tags. Default is `true`.
@ -355,28 +334,19 @@ one. Default is `true`.
**Word wrap:** Enable word wrap. Default is `false`.
**Enable popup:** Uncheck box if you do not want popup messages on system events.
Default is `true`.
**Enable popup:** Uncheck box if you do not want popup messages on system events. Default is `true`.
**Check updates:** Check updates on load. Default is `true`.
**Optimize subscription:** Optimize work with DataEngines. Probably you don't
want change this option despite the fact that one feature will not be available.
Default is `true`.
**Optimize subscription:** Optimize work with DataEngines. Probably you don't want change this option despite the fact that one feature will not be available. Default is `true`.
**Widget height:** Disable automatic widget height definition and set it to this
value. Default is `0` (auto).
**Widget height:** Disable automatic widget height definition and set it to this value. Default is `0` (auto).
**Widget width:** Disable automatic widget width definition and set it to this
value. Default is `0` (auto).
**Widget width:** Disable automatic widget width definition and set it to this value. Default is `0` (auto).
**Update interval:** Widget update interval. Default is `1000`.
**Queue limit:** Use thread pool with this maximum thread counts. `0` means CPU
ideal thread count. Default is `0`.
**Temperature units:** Select units for temperature. Available units are Celsius,
Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
**Temperature units:** Select units for temperature. Available units are Celsius, Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
**Custom time format:**
@ -419,38 +389,21 @@ Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
**AC offline tag:** Line which will be shown when AC is offline. Default is `( )`.
**Enable remote telemetry:** Enable upload of your configuration to remote server.
**History count:** Total count of stored configurations localy.
**Telemetry ID:** Unique client ID used for remote telemetry.
### <a href="#tooltips" class="anchor" id="tooltips"><span class="octicon octicon-link"></span></a>Tooltips
Since version 1.7.0 CPU, CPU clock, memory, swap, network and battery support
graphical tooltip. To enable them just select required fields. The number of
stored values can be set in the tab. Colours of the graphs are configurable too.
Since version 1.7.0 CPU, CPU clock, memory, swap, network and battery support graphical tooltip. To enable them just select required fields. The number of stored values can be set in the tab. Colours of the graphs are configurable too.
### <a href="#deguiconf" class="anchor" id="deguiconf"><span class="octicon octicon-link"></span></a>DataEngine settings
**ACPI path:** Path to ACPI devices. The file `/sys/class/power_supply/`.
**GPU device:** Select one of supported GPU devices. `auto` will enable auto
selection, `disable` will disable all GPU monitors. Default is `auto`.
**HDD:** Select one of HDDs for HDD temperature monitor. `all` will enable
monitor for all devices, `disable` will disable HDD temperature monitor. Default
is `all`.
**hddtemp cmd:** Type a command which will be run for hddtemp DataEngine. Default
is `sudo smartctl -a`.
**Player symbol count:** Symbol count for dynamic player tags.
**Music player:** Select one of supported music players for player label.
**MPRIS:** Select MPRIS player name. `auto` will enable auto selection. Default
is `auto`.
**MPRIS:** Select MPRIS player name. `auto` will enable auto selection. Default is `auto`.
**MPD address:** Address of MPD server. Default is `localhost`.
@ -458,32 +411,25 @@ is `auto`.
### <a href="#desktoppanel" class="anchor" id="desktoppanel"><span class="octicon octicon-link"></span></a>Desktop Panel
Since version 1.11.0 it provides a minimalistic panel to control destops.
And yes, it looks like the same panel in Awesome.
Since version 1.11.0 it provides a minimalistic panel to control destops. And yes, it looks like the same panel in Awesome.
### <a href="#dpconf" class="anchor" id="dpconf"><span class="octicon octicon-link"></span></a>Desktop panel configuration
**Enable background:** Uncheck to disable default background and set transparent
one. Default is `true`.
**Enable background:** Uncheck to disable default background and set transparent one. Default is `true`.
**Vertical layout:** Use vertical layout instead of horizontal one. Default is
`false`.
**Vertical layout:** Use vertical layout instead of horizontal one. Default is `false`.
**Widget height:** Disable automatic widget height definition and set it to this
value. Default is `0` (auto).
**Widget height:** Disable automatic widget height definition and set it to this value. Default is `0` (auto).
**Widget width:** Disable automatic widget width definition and set it to this
value. Default is `0` (auto).
**Widget width:** Disable automatic widget width definition and set it to this value. Default is `0` (auto).
**Mark:** Type symbol (or string) which will be shown if this desktop is active
now.
**Mark:** Type symbol (or string) which will be shown if this desktop is active now.
**Tooltip type:** Select tooltip type. Default is `windows`.
**Tooltip type:** Select tooltip type. Default is `contours`.
**Tooltip width:** Using tooltip width in px. Default is `200px`.
**Color of tooltip:** Colour which is used in some tooltip types. Default is
`#ffffff`.
**Color of tooltip:** Colour which is used in some tooltip types. Default is `#ffffff`.
**Pattern tags**
@ -493,6 +439,7 @@ now.
| `$name` | Name of the desktop. |
| `$number` | Number of the desktop. |
| `$total` | Total number of desktops. |
<!-- end of config block -->
<!-- gui block -->