mirror of
https://github.com/arcan1s/arcanis.me.git
synced 2025-04-28 09:17:18 +00:00
update AW pages
This commit is contained in:
parent
518956bdff
commit
4d1058ff64
@ -46,7 +46,9 @@ Directory is `desktops`, configuration files have the following fields:
|
|||||||
|
|
||||||
## <a href="#quotes" class="anchor" id="quotes"><span class="octicon octicon-link"></span></a>Quotes
|
## <a href="#quotes" class="anchor" id="quotes"><span class="octicon octicon-link"></span></a>Quotes
|
||||||
|
|
||||||
Directory is `quotes`, configuration files have the following fields:
|
To provide these data to users [Yahoo! Finance](//finance.yahoo.com/ "Yahoo!
|
||||||
|
Finance site") API iis used. Directory is `quotes`, configuration files have the
|
||||||
|
following fields:
|
||||||
|
|
||||||
| Field | Required | Value | Default |
|
| Field | Required | Value | Default |
|
||||||
|-------|----------|-------|---------|
|
|-------|----------|-------|---------|
|
||||||
@ -90,8 +92,8 @@ Directory is `upgrade`, configuration files have the following fields:
|
|||||||
|
|
||||||
## <a href="#weather" class="anchor" id="weather"><span class="octicon octicon-link"></span></a>Weather
|
## <a href="#weather" class="anchor" id="weather"><span class="octicon octicon-link"></span></a>Weather
|
||||||
|
|
||||||
The weather uses data and API from [OpenWeatherMap](//openweathermap.org/
|
The weather uses data and API from [Yahoo! Weather](//weather.yahoo.com
|
||||||
"OpenWeatherMap site"). Directory is `weather`, configuration files have the
|
"Yahoo! Weather site"). Directory is `weather`, configuration files have the
|
||||||
following fields:
|
following fields:
|
||||||
|
|
||||||
| Field | Required | Value | Default |
|
| Field | Required | Value | Default |
|
||||||
|
@ -46,9 +46,9 @@ alternative, but its configuration is the same that the new project creation.
|
|||||||
Here it is:
|
Here it is:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cppcheck --enable=warning,performance,portability,information,missingInclude
|
cppcheck --enable=warning,performance,portability,information,missingInclude \
|
||||||
--std=c++11 --library=qt.cfg --template="[{severity}][{id}] {message}
|
--std=c++11 --library=qt.cfg --verbose --quiet \
|
||||||
{callstack} (On {file}:{line})" --verbose --quiet
|
--template="[{severity}][{id}] {message} {callstack} (On {file}:{line})" \
|
||||||
path/to/source/files/or/directory
|
path/to/source/files/or/directory
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ You may edit DataEngine configuration. It is `/etc/xdg/plasma-dataengine-extsysm
|
|||||||
and `$HOME/.config/plasma-dataengine-extsysmon.conf`. Uncomment needed line and
|
and `$HOME/.config/plasma-dataengine-extsysmon.conf`. Uncomment needed line and
|
||||||
edit it.
|
edit it.
|
||||||
|
|
||||||
#### <a href="#deoptions" class="anchor" id="deoptions"><span class="octicon octicon-link"></span></a>DataEngine options
|
### <a href="#deoptions" class="anchor" id="deoptions"><span class="octicon octicon-link"></span></a>DataEngine options
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|----------|-----------|
|
|----------|-----------|
|
||||||
@ -137,19 +137,19 @@ Available flags are in the table below.
|
|||||||
| `$shorttime` | Time in short locale format. | 1.5.2 |
|
| `$shorttime` | Time in short locale format. | 1.5.2 |
|
||||||
| `$longtime` | Time in long locale format. | 1.5.2 |
|
| `$longtime` | Time in long locale format. | 1.5.2 |
|
||||||
| `$ctime` | Will enable custom time format. | 2.0.0 |
|
| `$ctime` | Will enable custom time format. | 2.0.0 |
|
||||||
| `$uptime` | System uptime, `---d--h--m`. |
|
| `$uptime` | System uptime, `---d--h--m`. ||
|
||||||
| `$cuptime` | Will enable custom uptime format. | 2.0.0 |
|
| `$cuptime` | Will enable custom uptime format. | 2.0.0 |
|
||||||
| `$la1` | Load average over 1 min, `-----`. | 2.4.0 |
|
| `$la1` | Load average over 1 min, `-----`. | 2.4.0 |
|
||||||
| `$la5` | Load average over 5 min, `-----`. | 2.4.0 |
|
| `$la5` | Load average over 5 min, `-----`. | 2.4.0 |
|
||||||
| `$la15` | Load average over 15 min, `-----`. | 2.4.0 |
|
| `$la15` | Load average over 15 min, `-----`. | 2.4.0 |
|
||||||
| `$cpu` | Total load CPU, %, `-----`. |
|
| `$cpu` | Total load CPU, %, `-----`. ||
|
||||||
| `$cpuN` | Load CPU for core N, %, `-----`. | 1.7.0 |
|
| `$cpuN` | Load CPU for core N, %, `-----`. | 1.7.0 |
|
||||||
| `$cpucl` | Average CPU clock, MHz, `----`. | 1.1.2 |
|
| `$cpucl` | Average CPU clock, MHz, `----`. | 1.1.2 |
|
||||||
| `$cpuclN` | CPU clock for core N, MHz, `----`. | 1.7.0 |
|
| `$cpuclN` | CPU clock for core N, MHz, `----`. | 1.7.0 |
|
||||||
| `$tempN` | Temperature for device N, `----`. For example, `$temp0`. |
|
| `$tempN` | Temperature for device N, `----`. For example, `$temp0`. ||
|
||||||
| `$gpu` | GPU usage, %, `-----`. `aticonfig` or `nvidia-smi` must be installed. | 1.3.2 |
|
| `$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 |
|
| `$gputemp` | GPU temperature, `----`. `aticonfig` or `nvidia-smi` must be installed. | 1.3.2 |
|
||||||
| `$mem` | Memory usage, %, `-----`. |
|
| `$mem` | Memory usage, %, `-----`. ||
|
||||||
| `$memmb` | Memory usage, MB, `-----`. | 1.1.1 |
|
| `$memmb` | Memory usage, MB, `-----`. | 1.1.1 |
|
||||||
| `$memgb` | Memory usage, GB, `----`. | 1.7.3 |
|
| `$memgb` | Memory usage, GB, `----`. | 1.7.3 |
|
||||||
| `$memfreemb` | Free memory, MB, `-----`. | 2.0.0 |
|
| `$memfreemb` | Free memory, MB, `-----`. | 2.0.0 |
|
||||||
@ -158,7 +158,7 @@ Available flags are in the table below.
|
|||||||
| `$memtotgb` | RAM, GB, `----`. | 1.10.0 |
|
| `$memtotgb` | RAM, GB, `----`. | 1.10.0 |
|
||||||
| `$memusedmb` | Used and cached memory, MB, `-----`. | 2.0.0 |
|
| `$memusedmb` | Used and cached memory, MB, `-----`. | 2.0.0 |
|
||||||
| `$memusedgb` | Used and cached memory, GB, `----`. | 2.0.0 |
|
| `$memusedgb` | Used and cached memory, GB, `----`. | 2.0.0 |
|
||||||
| `$swap` | Swap usage, %, `-----`. |
|
| `$swap` | Swap usage, %, `-----`. ||
|
||||||
| `$swapmb` | Swap usage, MB, `-----`. | 1.1.1 |
|
| `$swapmb` | Swap usage, MB, `-----`. | 1.1.1 |
|
||||||
| `$swapgb` | Swap usage, GB, `----`. | 1.7.3 |
|
| `$swapgb` | Swap usage, GB, `----`. | 1.7.3 |
|
||||||
| `$swapfreemb` | Free swap, MB, `-----`. | 2.0.0 |
|
| `$swapfreemb` | Free swap, MB, `-----`. | 2.0.0 |
|
||||||
@ -188,9 +188,9 @@ Available flags are in the table below.
|
|||||||
| `$upkbN` | Upload speed for device N, KB/s, `----`. | 3.0.0 |
|
| `$upkbN` | Upload speed for device N, KB/s, `----`. | 3.0.0 |
|
||||||
| `$upunitsN` | Upload speed units for device N, `----`. | 3.0.0 |
|
| `$upunitsN` | Upload speed units for device N, `----`. | 3.0.0 |
|
||||||
| `$netdev` | Current network device. | 1.1.1 |
|
| `$netdev` | Current network device. | 1.1.1 |
|
||||||
| `$bat` | Average battery charge, %, `---`. |
|
| `$bat` | Average battery charge, %, `---`. ||
|
||||||
| `$batN` | Battery N charge, %, `---`. | 2.0.3 |
|
| `$batN` | Battery N charge, %, `---`. | 2.0.3 |
|
||||||
| `$ac` | Status of AC device. Returns `(*)` if AC device is online or `( )` if offline. |
|
| `$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 |
|
| `$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 |
|
| `$dalbum` | Current song album with fixed symbols count shown as a running line. | 3.0.0 |
|
||||||
| `$salbum` | Current song album with fixed symbols count shown with three dots at the end. | 3.0.0 |
|
| `$salbum` | Current song album with fixed symbols count shown with three dots at the end. | 3.0.0 |
|
||||||
@ -225,7 +225,7 @@ Available flags are in the table below.
|
|||||||
| `$pressureN` | Pressure, bars. For example `$pressure0`. | 2.4.0 |
|
| `$pressureN` | Pressure, bars. For example `$pressure0`. | 2.4.0 |
|
||||||
| `$temperatureN` | Temperature. For example `$temperature0`. | 2.4.0 |
|
| `$temperatureN` | Temperature. For example `$temperature0`. | 2.4.0 |
|
||||||
|
|
||||||
##### <a href="#lambda" class="anchor" id="lambda"><span class="octicon octicon-link"></span></a>Lambda functions
|
### <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 widgets supports lambda functions, which are
|
Since version 3.0.0 the main widgets supports lambda functions, which are
|
||||||
calculated at runtime. It may be declared by using `{% raw %}${{{% endraw %}
|
calculated at runtime. It may be declared by using `{% raw %}${{{% endraw %}
|
||||||
@ -290,7 +290,38 @@ be calculated in runtime and to show different information depending on some
|
|||||||
conditions. But please keep in mind that such runtime calculation may increase
|
conditions. But please keep in mind that such runtime calculation may increase
|
||||||
CPU load.
|
CPU load.
|
||||||
|
|
||||||
##### <a href="#advanced" class="anchor" id="advanced"><span class="octicon octicon-link"></span></a>Advanced settings
|
Another feature which has been introduced with 3.1.0 is templates. It works in
|
||||||
|
the same way as lambda functions, but are calculated only once (at the start),
|
||||||
|
e.g.:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{% raw %}$template{{{% endraw %}
|
||||||
|
function three()
|
||||||
|
{
|
||||||
|
return 1+2;
|
||||||
|
}
|
||||||
|
three()
|
||||||
|
{% raw %}}}{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
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 with 3.1.0 has been introduced
|
||||||
|
several internal functions. They have the same syntax: `$aw_function<args>{{body}}`.
|
||||||
|
where args may be optional. If there are several args they should be comma
|
||||||
|
separated. If you want to pass comma as arg use `$,`. Functions will be called
|
||||||
|
once and before any actions.
|
||||||
|
|
||||||
|
| Function | Description | Args | Body |
|
||||||
|
|----------|-------------|------|------|
|
||||||
|
| `aw_all` | was introduced for debug purposes, return all keys by regexp in pretty format | (none) | regexp for search |
|
||||||
|
| `aw_count` | return count of keys by given regexp | (none) | regexp for search |
|
||||||
|
| `aw_keys` | return keys by given regexp joined by separator | separator | regexp for search |
|
||||||
|
| `aw_names` | return key names (i.e. without `$`) by given regexp joined by separator | separator | regexp for search |
|
||||||
|
|
||||||
|
### <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
|
**Enable background:** Uncheck to disable default background and set transparent
|
||||||
one. Default is `true`.
|
one. Default is `true`.
|
||||||
@ -306,6 +337,10 @@ Default is `true`.
|
|||||||
|
|
||||||
**Check updates:** Check updates on load. 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`.
|
||||||
|
|
||||||
**Widget height:** Disable automatic widget height definition and set it to this
|
**Widget height:** Disable automatic widget height definition and set it to this
|
||||||
value. Default is `0` (auto).
|
value. Default is `0` (auto).
|
||||||
|
|
||||||
@ -361,13 +396,13 @@ Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
|
|||||||
|
|
||||||
**AC offline tag:** Line which will be shown when AC is offline. Default is `( )`.
|
**AC offline tag:** Line which will be shown when AC is offline. Default is `( )`.
|
||||||
|
|
||||||
#### <a href="#tooltips" class="anchor" id="tooltips"><span class="octicon octicon-link"></span></a>Tooltips
|
### <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
|
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
|
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.
|
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
|
### <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/`.
|
**ACPI path:** Path to ACPI devices. The file `/sys/class/power_supply/`.
|
||||||
|
|
||||||
@ -397,7 +432,7 @@ is `auto`.
|
|||||||
Since version 1.11.0 it provides a minimalistic panel for monitoring on desktops.
|
Since version 1.11.0 it provides a minimalistic panel for monitoring on desktops.
|
||||||
And yes, it looks like the same panel in Awesome.
|
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
|
### <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
|
**Enable background:** Uncheck to disable default background and set transparent
|
||||||
one. Default is `true`.
|
one. Default is `true`.
|
||||||
|
@ -72,7 +72,7 @@ as proof-of-concept.
|
|||||||
|
|
||||||
* Link your application with this library.
|
* Link your application with this library.
|
||||||
|
|
||||||
#### <a href="#cmakeflags" class="anchor" id="cmakeflags"><span class="octicon octicon-link"></span></a>Available cmake flags:
|
### <a href="#cmakeflags" class="anchor" id="cmakeflags"><span class="octicon octicon-link"></span></a>Available cmake flags:
|
||||||
|
|
||||||
* `-DBUILD_AS_LIBRARY=0` - build the application but not a library.
|
* `-DBUILD_AS_LIBRARY=0` - build the application but not a library.
|
||||||
* `-DBUILD_DOCS=1` - build developer documentation.
|
* `-DBUILD_DOCS=1` - build developer documentation.
|
||||||
|
@ -46,7 +46,8 @@ short: aw-v21-bells-and-whistles
|
|||||||
|
|
||||||
## <a href="#quotes" class="anchor" id="quotes"><span class="octicon octicon-link"></span></a>Котировки
|
## <a href="#quotes" class="anchor" id="quotes"><span class="octicon octicon-link"></span></a>Котировки
|
||||||
|
|
||||||
Директория называется `quotes`, файлы настроек имеют следующие поля:
|
Для получения данных используется API [Yahoo! Finance](//finance.yahoo.com "Сайт
|
||||||
|
Yahoo! Finance"). Директория называется `quotes`, файлы настроек имеют следующие поля:
|
||||||
|
|
||||||
| Поле | Обязательное | Значение | По-умолчанию |
|
| Поле | Обязательное | Значение | По-умолчанию |
|
||||||
|------|--------------|----------|--------------|
|
|------|--------------|----------|--------------|
|
||||||
@ -90,8 +91,8 @@ short: aw-v21-bells-and-whistles
|
|||||||
|
|
||||||
## <a href="#weather" class="anchor" id="weather"><span class="octicon octicon-link"></span></a>Погода
|
## <a href="#weather" class="anchor" id="weather"><span class="octicon octicon-link"></span></a>Погода
|
||||||
|
|
||||||
Для показа погоды используются данные и API [OpenWeatherMap]
|
Для показа погоды используются данные и API [Yahoo! Weather]
|
||||||
(//openweathermap.org/ "Сайт OpenWeatherMap"). Директория называется `weather`,
|
(//weather.yahoo.com/ "Сайт Yahoo! Weather"). Директория называется `weather`,
|
||||||
файлы настроек имеют следующие поля:
|
файлы настроек имеют следующие поля:
|
||||||
|
|
||||||
| Поле | Обязательное | Значение | По-умолчанию |
|
| Поле | Обязательное | Значение | По-умолчанию |
|
||||||
|
@ -49,9 +49,9 @@ source будем использовать то, что имеется. Знат
|
|||||||
Тут все, казалось бы, очень просто:
|
Тут все, казалось бы, очень просто:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cppcheck --enable=warning,performance,portability,information,missingInclude
|
cppcheck --enable=warning,performance,portability,information,missingInclude \
|
||||||
--std=c++11 --library=qt.cfg --template="[{severity}][{id}] {message}
|
--std=c++11 --library=qt.cfg --verbose --quiet \
|
||||||
{callstack} (On {file}:{line})" --verbose --quiet
|
--template="[{severity}][{id}] {message} {callstack} (On {file}:{line})" \
|
||||||
path/to/source/files/or/directory
|
path/to/source/files/or/directory
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -143,19 +143,19 @@ html код. Смотри [вопрос](//github.com/arcan1s/awesome-widgets/is
|
|||||||
| `$shorttime` | Время в коротком формате локали. | 1.5.2 |
|
| `$shorttime` | Время в коротком формате локали. | 1.5.2 |
|
||||||
| `$longtime` | Время в длинном формате локали. | 1.5.2 |
|
| `$longtime` | Время в длинном формате локали. | 1.5.2 |
|
||||||
| `$ctime` | Специальный формат времени. | 2.0.0 |
|
| `$ctime` | Специальный формат времени. | 2.0.0 |
|
||||||
| `$uptime` | Системный аптайм, `---d--h--m`. |
|
| `$uptime` | Системный аптайм, `---d--h--m`. ||
|
||||||
| `$cuptime` | Специальный формат аптайма. | 2.0.0 |
|
| `$cuptime` | Специальный формат аптайма. | 2.0.0 |
|
||||||
| `$la1` | Средняя загрузка за 1 минуту, `-----`. | 2.4.0 |
|
| `$la1` | Средняя загрузка за 1 минуту, `-----`. | 2.4.0 |
|
||||||
| `$la5` | Средняя загрузка за 5 минут, `-----`. | 2.4.0 |
|
| `$la5` | Средняя загрузка за 5 минут, `-----`. | 2.4.0 |
|
||||||
| `$la15` | Средняя загрузка за 15 минут, `-----`. | 2.4.0 |
|
| `$la15` | Средняя загрузка за 15 минут, `-----`. | 2.4.0 |
|
||||||
| `$cpu` | Полная загрузка CPU, %, `-----`. |
|
| `$cpu` | Полная загрузка CPU, %, `-----`. ||
|
||||||
| `$cpuN` | Загрузка CPU для ядра N, %, `-----`. | 1.7.0 |
|
| `$cpuN` | Загрузка CPU для ядра N, %, `-----`. | 1.7.0 |
|
||||||
| `$cpucl` | Средняя частота CPU, МГц, `----`. | 1.1.2 |
|
| `$cpucl` | Средняя частота CPU, МГц, `----`. | 1.1.2 |
|
||||||
| `$cpuclN` | Частота CPU для ядра N, МГц, `----`. | 1.7.0 |
|
| `$cpuclN` | Частота CPU для ядра N, МГц, `----`. | 1.7.0 |
|
||||||
| `$tempN` | Температура для датчика N, `----`. Пример: `$temp0` |
|
| `$tempN` | Температура для датчика N, `----`. Пример: `$temp0` ||
|
||||||
| `$gpu` | Использование GPU, %, `-----`. `aticonfig` или `nvidia-smi` должны быть установлены. | 1.3.2 |
|
| `$gpu` | Использование GPU, %, `-----`. `aticonfig` или `nvidia-smi` должны быть установлены. | 1.3.2 |
|
||||||
| `$gputemp` | Температура GPU, `----`. `aticonfig` или `nvidia-smi` должны быть установлены. | 1.3.2 |
|
| `$gputemp` | Температура GPU, `----`. `aticonfig` или `nvidia-smi` должны быть установлены. | 1.3.2 |
|
||||||
| `$mem` | Использование RAM, %, `-----`. |
|
| `$mem` | Использование RAM, %, `-----`. ||
|
||||||
| `$memmb` | Использование RAM, MB, `-----`. | 1.1.1 |
|
| `$memmb` | Использование RAM, MB, `-----`. | 1.1.1 |
|
||||||
| `$memgb` | Использование RAM, GB, `----`. | 1.7.3 |
|
| `$memgb` | Использование RAM, GB, `----`. | 1.7.3 |
|
||||||
| `$memfreemb` | Свободная RAM, MB, `-----`. | 2.0.0 |
|
| `$memfreemb` | Свободная RAM, MB, `-----`. | 2.0.0 |
|
||||||
@ -164,7 +164,7 @@ html код. Смотри [вопрос](//github.com/arcan1s/awesome-widgets/is
|
|||||||
| `$memtotgb` | RAM, GB, `----`. | 1.10.0 |
|
| `$memtotgb` | RAM, GB, `----`. | 1.10.0 |
|
||||||
| `$memusedmb` | Занятая и кэшированная RAM, MB, `-----`. | 2.0.0 |
|
| `$memusedmb` | Занятая и кэшированная RAM, MB, `-----`. | 2.0.0 |
|
||||||
| `$memusedgb` | Занятая и кэшированная RAM, GB, `----`. | 2.0.0 |
|
| `$memusedgb` | Занятая и кэшированная RAM, GB, `----`. | 2.0.0 |
|
||||||
| `$swap` | Использование swap, %, `-----`. |
|
| `$swap` | Использование swap, %, `-----`. ||
|
||||||
| `$swapmb` | Использование swap, MB, `-----`. | 1.1.1 |
|
| `$swapmb` | Использование swap, MB, `-----`. | 1.1.1 |
|
||||||
| `$swapgb` | Использование swap, GB, `----`. | 1.7.3 |
|
| `$swapgb` | Использование swap, GB, `----`. | 1.7.3 |
|
||||||
| `$swapfreemb` | Свободный swap, MB, `-----`. | 2.0.0 |
|
| `$swapfreemb` | Свободный swap, MB, `-----`. | 2.0.0 |
|
||||||
@ -194,9 +194,9 @@ html код. Смотри [вопрос](//github.com/arcan1s/awesome-widgets/is
|
|||||||
| `$upkbN` | Скорость отдачи устройства N, KB/s, `----`. | 3.0.0 |
|
| `$upkbN` | Скорость отдачи устройства N, KB/s, `----`. | 3.0.0 |
|
||||||
| `$upunitsN` | Единицы скорости отдачи устройства N, `----`. | 3.0.0 |
|
| `$upunitsN` | Единицы скорости отдачи устройства N, `----`. | 3.0.0 |
|
||||||
| `$netdev` | Текущее устройство. | 1.1.1 |
|
| `$netdev` | Текущее устройство. | 1.1.1 |
|
||||||
| `$bat` | Средний заряд батареи, %, `---`. |
|
| `$bat` | Средний заряд батареи, %, `---`. ||
|
||||||
| `$batN` | Заряд батареи N, %, `---`. | 2.0.3 |
|
| `$batN` | Заряд батареи N, %, `---`. | 2.0.3 |
|
||||||
| `$ac` | Статус зарядного устройства. Возвращает `(*)`, если устройство подключено, или `( )`, если нет. |
|
| `$ac` | Статус зарядного устройства. Возвращает `(*)`, если устройство подключено, или `( )`, если нет. ||
|
||||||
| `$album` | Альбом текущей песни. Один из поддерживаемых музыкальных плееров должен быть установлен. | 1.5.3 |
|
| `$album` | Альбом текущей песни. Один из поддерживаемых музыкальных плееров должен быть установлен. | 1.5.3 |
|
||||||
| `$dalbum` | Альбом текущей песни с фиксированным количеством символов, показывающийся, как бегущая строка. | 3.0.0 |
|
| `$dalbum` | Альбом текущей песни с фиксированным количеством символов, показывающийся, как бегущая строка. | 3.0.0 |
|
||||||
| `$salbum` | Альбом текущей песни с фиксированным количеством символов, показывающийся с многоточием на конце. | 3.0.0 |
|
| `$salbum` | Альбом текущей песни с фиксированным количеством символов, показывающийся с многоточием на конце. | 3.0.0 |
|
||||||
@ -231,7 +231,7 @@ html код. Смотри [вопрос](//github.com/arcan1s/awesome-widgets/is
|
|||||||
| `$pressureN` | Давление, бар. Например `$pressure0`. | 2.4.0 |
|
| `$pressureN` | Давление, бар. Например `$pressure0`. | 2.4.0 |
|
||||||
| `$temperatureN` | Температура. Humidity `$temperature0`. | 2.4.0 |
|
| `$temperatureN` | Температура. Humidity `$temperature0`. | 2.4.0 |
|
||||||
|
|
||||||
### <a href="#lambda" class="anchor" id="lambda"><span class="octicon octicon-link"></span></a>Лямбда функции
|
### <a href="#lambda" class="anchor" id="lambda"><span class="octicon octicon-link"></span></a>Лямбда и шаблонные функции
|
||||||
|
|
||||||
Начиная с версии 3.0.0 основной виджет поддерживает лямбда выражения, которые
|
Начиная с версии 3.0.0 основной виджет поддерживает лямбда выражения, которые
|
||||||
рассчитываются в рантайме. Они объявляются использованием конструкции
|
рассчитываются в рантайме. Они объявляются использованием конструкции
|
||||||
@ -297,6 +297,37 @@ runningLine()
|
|||||||
пожалуйста, учитывайте, что подобные вычисления в рантайме могут увеличить
|
пожалуйста, учитывайте, что подобные вычисления в рантайме могут увеличить
|
||||||
нагрузку на CPU.
|
нагрузку на CPU.
|
||||||
|
|
||||||
|
Другое дополнение, которое было введено с 3.1.0 - шаблоны. Они работают также,
|
||||||
|
как и лямбда выражения, однако вычисляются один раз (на старте), например:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{% raw %}$template{{{% endraw %}
|
||||||
|
function three()
|
||||||
|
{
|
||||||
|
return 1+2;
|
||||||
|
}
|
||||||
|
three()
|
||||||
|
{% raw %}}}{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
всегда будет показывать `3` и не будер расчитываться каждый раз.
|
||||||
|
|
||||||
|
### <a href="#functions" class="anchor" id="functions"><span class="octicon octicon-link"></span></a>Специальные функции
|
||||||
|
|
||||||
|
Чтобы улучшить работу лямбда и шаблонных функций с 3.1.0 были введены несколько
|
||||||
|
внутренних функций. Они имеют следующий синтаксис:
|
||||||
|
`$aw_function<аргументы>{{тело}}`, где аргументы могут быть опциональными. Если
|
||||||
|
вы хотите передать несколько аргументов, они должны быть разделены запятыми.
|
||||||
|
Если вы хотите передать запятую, как аргумент, используйте `$,`. Функции будут
|
||||||
|
вызваны один раз при запуске перед все остальным.
|
||||||
|
|
||||||
|
| Функция | Описание | Аргументы | Тело |
|
||||||
|
|---------|----------|-----------|------|
|
||||||
|
| `aw_all` | была введена для отладки, возвращает все ключи по регекспу | (нет) | регексп для поиска |
|
||||||
|
| `aw_count` | возвращает количество ключей по заданному регекспу | (нет) | регексп для поиска |
|
||||||
|
| `aw_keys` | возвращает ключи по заданному регекспу, объединенные разделителем | разделитель | регексп для поиска |
|
||||||
|
| `aw_names` | возвращает имена ключей (т.е. без `$`) по заданному регекспу, объединенные разделителем | разделитель | регексп для поиска |
|
||||||
|
|
||||||
### <a href="#advanced" class="anchor" id="advanced"><span class="octicon octicon-link"></span></a>Расширенные настройки
|
### <a href="#advanced" class="anchor" id="advanced"><span class="octicon octicon-link"></span></a>Расширенные настройки
|
||||||
|
|
||||||
**Включить фон:** Снимите галочку, чтобы отключить стандартный фон виджета и
|
**Включить фон:** Снимите галочку, чтобы отключить стандартный фон виджета и
|
||||||
@ -315,6 +346,10 @@ runningLine()
|
|||||||
**Проверять обновления:** Проверять или нет обновления при запуске. По умолчанию
|
**Проверять обновления:** Проверять или нет обновления при запуске. По умолчанию
|
||||||
`true`.
|
`true`.
|
||||||
|
|
||||||
|
**Оптимизировать подписку:** Оптимизировать работу с DataEngine. Вероятно, вы не
|
||||||
|
хотите менять эту опцию, несмотря на тот факт, что одна функция будет недоступна.
|
||||||
|
По умолчанию `true`.
|
||||||
|
|
||||||
**Высота виджета:** Отключит автоматическое определение высоты виджета и
|
**Высота виджета:** Отключит автоматическое определение высоты виджета и
|
||||||
установит ее в данное значение. По умолчанию `0` (автоматически).
|
установит ее в данное значение. По умолчанию `0` (автоматически).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user