From f92ad7181d072c3c9aa7853c3d9e90f0cbb3f479 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Fri, 19 Dec 2014 02:20:39 +0300 Subject: [PATCH] add paper --- .../2014-12-19-aw-2.1-bells-and-whistles.html | 138 ++++++++++++++++++ .../2014-12-19-aw-2.1-bells-and-whistles.html | 138 ++++++++++++++++++ 2 files changed, 276 insertions(+) create mode 100644 _posts/2014-12-19-aw-2.1-bells-and-whistles.html create mode 100644 ru/_posts/2014-12-19-aw-2.1-bells-and-whistles.html diff --git a/_posts/2014-12-19-aw-2.1-bells-and-whistles.html b/_posts/2014-12-19-aw-2.1-bells-and-whistles.html new file mode 100644 index 0000000..5c81eaf --- /dev/null +++ b/_posts/2014-12-19-aw-2.1-bells-and-whistles.html @@ -0,0 +1,138 @@ +--- +category: en +type: paper +hastr: true +layout: paper +tags: awesome-widgets, pytextmonitor +title: Awesome Widgets 2.1: bells and whistles +short: aw-2.1-bells-and-whistles +description: The paper deals with settings of a custom scripts and graphical bars in the new version of Awesome Widgets (2.1). +--- +

Introduction

+

For a start it is highly recommended copy file $HOME/.kde4/share/config/extsysmon.conf after widget update before you open widget settings, because old and new script settings are incompatible. Also I should note that these features can be configured from graphical interface, but I will describe how it can be done by simply editing the desktop file.

+ +

Bars

+

Bars are stored in the two directories: /usr/share/apps/plasma_applet_awesome-widget/desktops/ and $HOME/.kde4/share/apps/plasma_applet_awesome-widget/desktops/ (path may be differ in depend from your distro). Settings in the home directory have a higher priority that global ones. Configuration files have the following fields:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRequiredValueDefault
Nameyesbar name. It should be as barN and should be uniquenone
Commentnocommentempty
X-AW-Valueyesbar value. The following tags are available cpu*, gpu, mem, swap, hdd*, batcpu
X-AW-ActiveColoryesactive part fill in format R,G,B,A0,0,0,130
X-AW-InactiveColoryesinactive part fill in format R,G,B,A255,255,255,130
X-AW-Typeyesbar type. The following types are supported Horizontal, Vertical, CircleHorizontal
X-AW-Directionyesthe fill direction. The following variants are supported LeftToRight, RightToLeftLeftToRight
X-AW-Heightyesheight, pixels100
X-AW-Widthyeswidth, pixels100
+ +

Scripts

+

Scripts are stored in the two directories: /usr/share/apps/plasma_engine_extsysmon/scripts/ and $HOME/.kde4/share/apps/plasma_engine_extsysmon/scripts/ (path may be differ in depend from your distro). Settings in the home directory have a higher priority that global ones. To enable script you should type it on the output field. Configuration files have the following fields:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRequiredValueDefault
Nameyesscript namenone
Commentnocommentempty
Execyespath to executable file/usr/bin/true
X-AW-Prefixnoprefix to executable file. Usually it's not required, but in other you may want to specify interpretor for example.
X-AW-Activenowhether or not the script is activetrue
X-AW-Outputnowhether or not the script has output to console. You may set it to false if you want use the script as cron jobstrue
X-AW-Redirectnostream redirection. The following variants are available stderr2stdout, nothing, stdout2stderr. stderr will be enabled, if you run application with DEBUG=yesnothing
X-AW-Intervalnoupdate interval in standard widget intervals1
\ No newline at end of file diff --git a/ru/_posts/2014-12-19-aw-2.1-bells-and-whistles.html b/ru/_posts/2014-12-19-aw-2.1-bells-and-whistles.html new file mode 100644 index 0000000..a73b7b7 --- /dev/null +++ b/ru/_posts/2014-12-19-aw-2.1-bells-and-whistles.html @@ -0,0 +1,138 @@ +--- +category: ru +type: paper +hastr: true +layout: paper +tags: awesome-widgets, pytextmonitor +title: Awesome Widgets 2.1: свистелки и перделки +short: aw-2.1-bells-and-whistles +description: Данная статья посвящена обсуждению настройки своих скриптов и графических баров в новой версии Awesome Widgets (2.1). +--- +

Введение

+

Для начала, я настоятельно рекомендую для после обновления не открывая настроек виджета скопировать в безопасное место файл $HOME/.kde4/share/config/extsysmon.conf, так как старые настройки кастомных скриптов теперь несовместимы. Вообще, следует заметить, что обе новых фичи можно настраивать и из графического интерфейса, однако я опишу, как это делается простым редактированием desktop файлов.

+ +

Бары

+

Бары хранятся в двух директориях: /usr/share/apps/plasma_applet_awesome-widget/desktops/ и $HOME/.kde4/share/apps/plasma_applet_awesome-widget/desktops/ (пути могут немного отличаться в зависимости от используемого дистрибутива). Настройки в домашней директории перезаписывают глобальные настройки. Файлы настроек имеют следующие поля:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ПолеОбязательноеЗначениеПо-умолчанию
Nameдаимя бара. Должно иметь вид barN и быть уникальнымnone
Commentнеткомментарийempty
X-AW-Valueдазначение бара. Доступны теги cpu*, gpu, mem, swap, hdd*, batcpu
X-AW-ActiveColorдазаполнение активной части в формате R,G,B,A0,0,0,130
X-AW-InactiveColorдазаполнение неактивной части в формате R,G,B,A255,255,255,130
X-AW-Typeдатип бара. Поддерживаемые типы Horizontal, Vertical, CircleHorizontal
X-AW-Directionданаправление заполнения. Доступны варианты LeftToRight, RightToLeftLeftToRight
X-AW-Heightдавысота в пикселях100
X-AW-Widthдаширина в пикселях100
+ +

Скрипты

+

Скрипты хранятся в двух директориях: /usr/share/apps/plasma_engine_extsysmon/scripts/ и $HOME/.kde4/share/apps/pplasma_engine_extsysmon/scripts/ (пути могут немного отличаться в зависимости от используемого дистрибутива). Настройки в домашней директории перезаписывают глобальные настройки. Для того, чтобы активировать скрипт необходимо прописать нужный тег в поле вывода. Файлы настроек имеют следующие поля:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ПолеОбязательноеЗначениеПо-умолчанию
Nameдаимя скриптаnone
Commentнеткомментарийempty
Execдапуть к исполняемому файлу/usr/bin/true
X-AW-Prefixнетпрефикс к исполняемому файлу. Обычно не требуется, однако в отдельных случаях может потребоваться явно указать путь, например, к используемому интерпретатору
X-AW-Activeнетактивен или нет данный скриптtrue
X-AW-Outputнетимеет ли данный скрипт сообщения в консоль. Полезно выставить в false, если вы хотите использовать скрипт, как аналог задач в crontrue
X-AW-Redirectнетперенаправление потоков сообщений. Доступны варианты stderr2stdout, nothing, stdout2stderr. stderr доступен, если запустить с DEBUG=yesnothing
X-AW-Intervalдаинтервал запуска скрипта в стандартных интервалах обновления виджета1
\ No newline at end of file