mirror of
https://github.com/arcan1s/arcanis.me.git
synced 2025-04-24 15:27:17 +00:00
328 lines
8.7 KiB
HTML
328 lines
8.7 KiB
HTML
---
|
|
category: en
|
|
type: paper
|
|
hastr: true
|
|
layout: paper
|
|
tags: awesome-widgets, pytextmonitor
|
|
title: Awesome Widgets - bells and whistles
|
|
short: aw-v21-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).
|
|
---
|
|
<h2><a href="#intro" class="anchor" id="intro"><span class="octicon octicon-link"></span></a>Introduction</h2>
|
|
<p>For a start it is highly recommended copy file <code>$HOME/.kde4/share/config/extsysmon.conf</code> 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.</p>
|
|
|
|
<h2><a href="#general" class="anchor" id="general"><span class="octicon octicon-link"></span></a>General</h2>
|
|
<p>Items are stored in the two directories: <code>/usr/share/awesomewidgets/%TYPE%/</code> and <code>$HOME/.local/share/awesomewidgets/%TYPE%/</code> (path may be differ in depend from your distro). Settings in the home directory have a higher priority that global ones.</p>
|
|
|
|
<h2><a href="#bars" class="anchor" id="bars"><span class="octicon octicon-link"></span></a>Bars</h2>
|
|
<p>Directory is <code>desktops</code>, configuration files have the following fields:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Required</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td>yes</td>
|
|
<td>bar name. It should be as <code>barN</code> and should be unique</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<td>no</td>
|
|
<td>comment</td>
|
|
<td>empty</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Value</th>
|
|
<td>yes</td>
|
|
<td>bar value. The following tags are available <code>cpu*</code>, <code>gpu</code>, <code>mem</code>, <code>swap</code>, <code>hdd*</code>, <code>bat</code></td>
|
|
<td>cpu</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-ActiveColor</th>
|
|
<td>yes</td>
|
|
<td>active part fill in format <code>R,G,B,A</code></td>
|
|
<td>0,0,0,130</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-InactiveColor</th>
|
|
<td>yes</td>
|
|
<td>inactive part fill in format <code>R,G,B,A</code></td>
|
|
<td>255,255,255,130</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Type</th>
|
|
<td>yes</td>
|
|
<td>bar type. The following types are supported <code>Horizontal</code>, <code>Vertical</code>, <code>Circle</code>, <code>Graph</code></td>
|
|
<td>Horizontal</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Direction</th>
|
|
<td>yes</td>
|
|
<td>the fill direction. The following variants are supported <code>LeftToRight</code>, <code>RightToLeft</code></td>
|
|
<td>LeftToRight</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Height</th>
|
|
<td>yes</td>
|
|
<td>height, pixels</td>
|
|
<td>100</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Width</th>
|
|
<td>yes</td>
|
|
<td>width, pixels</td>
|
|
<td>100</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Number</th>
|
|
<td>yes</td>
|
|
<td>unique number which will be associated with the bar. The property has been introduced to provide compatibility with others items. Should be the same as number in Name is</td>
|
|
<td>number from Name</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a href="#quotes" class="anchor" id="quotes"><span class="octicon octicon-link"></span></a>Quotes</h2>
|
|
<p>Directory is <code>quotes</code>, configuration files have the following fields:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Required</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td>yes</td>
|
|
<td>quotes name</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<td>no</td>
|
|
<td>comment</td>
|
|
<td>empty</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Ticker</th>
|
|
<td>yes</td>
|
|
<td>ticker from Yahoo! Finance system</td>
|
|
<td>EURUSD=X</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Active</th>
|
|
<td>no</td>
|
|
<td>whether or not the quotes is active</td>
|
|
<td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Interval</th>
|
|
<td>no</td>
|
|
<td>update interval in standard widget intervals</td>
|
|
<td>1</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Number</th>
|
|
<td>yes</td>
|
|
<td>unique number which will be associated with the script</td>
|
|
<td>random number which is less than 1000</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a href="#scripts" class="anchor" id="scripts"><span class="octicon octicon-link"></span></a>Scripts</h2>
|
|
<p>Directory is <code>scripts</code>, configuration files have the following fields:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Required</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td>yes</td>
|
|
<td>script name</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<td>no</td>
|
|
<td>comment</td>
|
|
<td>empty</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Exec</th>
|
|
<td>yes</td>
|
|
<td>path to executable file</td>
|
|
<td>/usr/bin/true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Prefix</th>
|
|
<td>no</td>
|
|
<td>prefix to executable file. Usually it's not required, but in other you may want to specify interpreter for example</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Active</th>
|
|
<td>no</td>
|
|
<td>whether or not the script is active</td>
|
|
<td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Redirect</th>
|
|
<td>no</td>
|
|
<td>stream redirection. The following variants are available <code>stderr2stdout</code>, <code>nothing</code>, <code>stdout2stderr</code>, <code>swap</code>. stderr will be available, if you run application in the debug mode</td>
|
|
<td>nothing</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Interval</th>
|
|
<td>no</td>
|
|
<td>update interval in standard widget intervals</td>
|
|
<td>1</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Number</th>
|
|
<td>yes</td>
|
|
<td>unique number which will be associated with the script</td>
|
|
<td>random number which is less than 1000</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Filters</th>
|
|
<td>no</td>
|
|
<td>comma separated filters from <code>awesomewidgets-extscripts-filters.json</code></td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a href="#upgrade" class="anchor" id="upgrade"><span class="octicon octicon-link"></span></a>Upgrade</h2>
|
|
<p>Directory is <code>upgrade</code>, configuration files have the following fields:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Required</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td>yes</td>
|
|
<td>upgrade name</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<td>no</td>
|
|
<td>comment</td>
|
|
<td>empty</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Exec</th>
|
|
<td>yes</td>
|
|
<td>path to executable file</td>
|
|
<td>/usr/bin/true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Filter</th>
|
|
<td>no</td>
|
|
<td>the regexp which will be applied to command output. If set <code>X-AW-Null</code> will be ignored</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Active</th>
|
|
<td>no</td>
|
|
<td>whether or not the upgrade script is active</td>
|
|
<td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Null</th>
|
|
<td>no</td>
|
|
<td>the number of lines which should be skipped in output</td>
|
|
<td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Interval</th>
|
|
<td>no</td>
|
|
<td>update interval in standard widget intervals</td>
|
|
<td>1</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Number</th>
|
|
<td>yes</td>
|
|
<td>unique number which will be associated with the upgrade script</td>
|
|
<td>random number which is less than 1000</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a href="#weather" class="anchor" id="weather"><span class="octicon octicon-link"></span></a>Weather</h2>
|
|
<p>The weather uses data and API from <a href="//openweathermap.org/" title="OpenWeatherMap site">OpenWeatherMap</a>. Directory is <code>weather</code>, configuration files have the following fields:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Required</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td>yes</td>
|
|
<td>weather name</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Comment</th>
|
|
<td>no</td>
|
|
<td>comment</td>
|
|
<td>empty</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-City</th>
|
|
<td>yes</td>
|
|
<td>city</td>
|
|
<td>London</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Country</th>
|
|
<td>yes</td>
|
|
<td>two-letter country code</td>
|
|
<td>uk</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Image</th>
|
|
<td>no</td>
|
|
<td>use images as weather icon or text.</td>
|
|
<td>false</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-TS</th>
|
|
<td>yes</td>
|
|
<td>time to which weather should be. <code>0</code> is a current weather, <code>1</code> - weather 3 hours later, etc</td>
|
|
<td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Active</th>
|
|
<td>no</td>
|
|
<td>whether or not the monitor is active</td>
|
|
<td>true</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Interval</th>
|
|
<td>no</td>
|
|
<td>update interval in standard widget intervals</td>
|
|
<td>1</td>
|
|
</tr>
|
|
<tr>
|
|
<th>X-AW-Number</th>
|
|
<td>yes</td>
|
|
<td>unique number which will be associated with the upgrade weather</td>
|
|
<td>random number which is less than 1000</td>
|
|
</tr>
|
|
</table>
|