mirror of
https://github.com/arcan1s/arcanis.me.git
synced 2025-07-13 21:25:46 +00:00
change project structure to more pretty one
This commit is contained in:
183
projects/_posts/2013-02-12-git-etc.md
Normal file
183
projects/_posts/2013-02-12-git-etc.md
Normal file
@ -0,0 +1,183 @@
|
||||
---
|
||||
permalink: projects/git-etc
|
||||
hastr: true
|
||||
layout: project
|
||||
title: git-etc
|
||||
short: git-etc
|
||||
tags: git, python, qt, linux, daemon, system
|
||||
hasgui: true
|
||||
hasdocs: false
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
license: GPLv3
|
||||
links:
|
||||
- Archlinux <a href="//aur.archlinux.org/packages/git-etc", title="AUR">AUR package</a>
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
Simple daemon that automatically creates git repository in the given directory and creates commit at the specified time interval.
|
||||
|
||||
<!--more-->
|
||||
|
||||
```bash
|
||||
$ git-etc --help
|
||||
Simple daemon written on BASH for monitoring changes in files
|
||||
|
||||
Usage: git-etc [ -c | --config /etc/git-etc.conf ] [ -h | --help ] [ -v | --version ]
|
||||
|
||||
Parametrs:
|
||||
-c --config - path to configuration file
|
||||
-h --help - show this help and exit
|
||||
-v --version - show version and exit
|
||||
|
||||
See "man 1 git-etc" for more details
|
||||
```
|
||||
|
||||
```bash
|
||||
$ ctrlconf --help
|
||||
GUI for git-etc daemon
|
||||
|
||||
Usage: ctrlconf [ --default ] [ -h | --help ] [ -v | --version ]
|
||||
|
||||
Additional parametrs:
|
||||
--default - create default configuration file
|
||||
-h --help - show this help and exit
|
||||
-v --version - show version and exit
|
||||
|
||||
See "man 1 ctrlconf" for more details
|
||||
```
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
|
||||
|
||||
* Download an [archive](//github.com/arcan1s/git-etc/releases "GitHub") with latest version of source files.
|
||||
* Extract it and install the application:
|
||||
|
||||
```bash
|
||||
./install.sh "/path/to/root"
|
||||
```
|
||||
|
||||
If you want install it to `/` you must run it as root, e.g.:
|
||||
|
||||
```bash
|
||||
sudo ./install.sh
|
||||
```
|
||||
|
||||
If no path is specified it will be installed to `/` by default.
|
||||
|
||||
### <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.
|
||||
|
||||
* Bash (including awk, grep, sed)
|
||||
* git
|
||||
* python2 *(make)*
|
||||
* systemd *(optional, service file)*
|
||||
* python2-pyqt4 *(optional, GUI)*
|
||||
* xterm *(optional, GUI)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
If you want to start the daemon into `/etc` just run
|
||||
|
||||
```bash
|
||||
systemctl start git-etc
|
||||
```
|
||||
|
||||
If you want to enable daemon autoload run
|
||||
|
||||
```bash
|
||||
systemctl enable git-etc
|
||||
```
|
||||
|
||||
But you may change path to configuration file or change parameters. To do it just copy (recommended) the source configuration file to new path
|
||||
|
||||
```bash
|
||||
cp /etc/git-etc.conf /new/path/to/file/git-etc.conf
|
||||
```
|
||||
|
||||
and edit it. Then copy the source service file to `/etc`:
|
||||
|
||||
```bash
|
||||
cp /usr/lib/systemd/system/git-etc.service /etc/systemd/system/git-etc-my-profile.service
|
||||
```
|
||||
|
||||
Replace following string in the file:
|
||||
|
||||
```bash
|
||||
ExecStart=/usr/bin/git-etc -c /etc/git-etc.conf
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```bash
|
||||
ExecStart=/usr/bin/git-etc -c /new/path/to/file/git-etc.conf
|
||||
```
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
## <a href="#config" class="anchor" id="config"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
All settings are stored in `/etc/git-etc.conf`. After edit them you must restart daemon
|
||||
|
||||
```bash
|
||||
systemctl restart git-etc
|
||||
```
|
||||
|
||||
### <a href="#options" class="anchor" id="options"><span class="octicon octicon-link"></span></a>Options
|
||||
|
||||
| | |
|
||||
|------------|-------|
|
||||
| DIRECTORY | Full path to working directory with observed files. Default is `/etc`. |
|
||||
| TIMESLEEP | Time interval between updates, hours. It must be integer and >= 1\. Default is `12`. |
|
||||
| IGNORELIST | List of files that will not be observed. Separator is ";;". May be empty. |
|
||||
| FORALL | `1` will enable access for normal user. Default is `1`. |
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
## <a href="#gui" class="anchor" id="gui"><span class="octicon octicon-link"></span></a>Graphical user interface
|
||||
|
||||
Control Config (`ctrlconf`) is GUI for `git-etc` daemon written on `Python2/PyQt4`. This application allows you to view a list of commits and changes in files recorded in commit messages. Also, this application allows you to roll back to a specific commit all files (`git reset --hard`) or individual files (`git diff && git apply`). And you may merge old and new configuration files (used two branches repository - master and experimental). The application may need root privileges. Make sure that `sudo` package is installed.
|
||||
|
||||
### <a href="#gui_configuration" class="anchor" id="gui_configuration"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
Just run the application and open the settings window from menu!
|
||||
|
||||
### <a href="#screenshots" class="anchor" id="screenshots"><span class="octicon octicon-link"></span></a>Screenshots
|
||||
|
||||
(Screenshots in Russian, but GUI has English translation.)
|
||||
|
||||
<div class="thumbnails">
|
||||
{% assign scrdesc = "Main window" %}
|
||||
{% assign scrname = "git-etc_mainwindow" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "About window" %}
|
||||
{% assign scrname = "git-etc_aboutwindow" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Commit window" %}
|
||||
{% assign scrname = "git-etc_commitwindow" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Merging window" %}
|
||||
{% assign scrname = "git-etc_mergingwindow" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Roll back window" %}
|
||||
{% assign scrname = "git-etc_rollbackwindow" %}
|
||||
{% include prj_scr.html %}
|
||||
</div>
|
||||
<!-- end of gui block -->
|
420
projects/_posts/2013-02-21-awesome-widgets.md
Normal file
420
projects/_posts/2013-02-21-awesome-widgets.md
Normal file
@ -0,0 +1,420 @@
|
||||
---
|
||||
permalink: projects/awesome-widgets
|
||||
hastr: true
|
||||
layout: project
|
||||
title: Awesome Widgets
|
||||
short: awesome-widgets
|
||||
tags: python, kde, qt, linux, system, awesome
|
||||
hasgui: true
|
||||
hasdocs: false
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
- Ernesto Avilés Vzqz (Spanish translation)
|
||||
- Mermouy (French translation)
|
||||
- underr (Brazillian Portuguese translation)
|
||||
- Виктор Слободян (Ukrainian translation)
|
||||
- Lemueler (Chinese translation)
|
||||
- Heimen Stoffels (Dutch translation)
|
||||
license: GPLv3
|
||||
links:
|
||||
- Plasmoid page on <a href="//kde-look.org/content/show.php/Awesome+Widgets?content=157124" title="kde-look">kde-look.org</a>
|
||||
- DataEngine page on <a href="//kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773" title="kde-look">kde-look.org</a>
|
||||
- Archlinux <a href="//aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets" title="AUR">AUR package</a>
|
||||
- <a href="//software.opensuse.org/package/plasma5-awesome-widgets" title="openSUSE">openSUSE package</a> (thanks to Kott)
|
||||
- <a href="//github.com/arcan1s/awesome-widgets/releases" title="Ubuntu">Ubuntu package</a>
|
||||
- <a href="/en/2014/09/04/migration-to-v2/" title="Migration">Migration to version 2.0</a>
|
||||
- <a href="/en/2014/12/19/aw-v21-bells-and-whistles/" title="ExtItems">Extensions</a>
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
A collection of minimalistic easily configurable Plasmoids written on `C++/Qt`. They look like widgets in [Awesome WM](//awesome.naquadah.org/ "Awesome Homepage"). Also this packages has an additional system [DataEngine](//techbase.kde.org/Development/Tutorials/Plasma/DataEngines "Developers tutorial").
|
||||
|
||||
<!--more-->
|
||||
|
||||
**NOTE:** [LOOKING FOR TRANSLATORS!](//github.com/arcan1s/awesome-widgets/issues/14 "Ticket")
|
||||
|
||||
**PLASMA 5 COMPATIBLE!**
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
### <a href="#changelog" class="anchor" id="changelog"><span class="octicon octicon-link"></span></a>Changelog
|
||||
|
||||
[CHANGELOG](//github.com/arcan1s/awesome-widgets/blob/master/CHANGELOG "GitHub")
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <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.
|
||||
* 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
|
||||
```
|
||||
|
||||
**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
|
||||
* 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)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
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.
|
||||
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
## <a href="#config" class="anchor" id="config"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
### <a href="#deconf" class="anchor" id="deconf"><span class="octicon octicon-link"></span></a>DataEngine configuration
|
||||
|
||||
You may edit DataEngine configuration. It is `/etc/xdg/plasma-dataengine-extsysmon.conf` and `$HOME/.config/plasma-dataengine-extsysmon.conf`. Uncomment needed line and edit it.
|
||||
|
||||
#### <a href="#deoptions" class="anchor" id="deoptions"><span class="octicon octicon-link"></span></a>DataEngine options
|
||||
|
||||
| | |
|
||||
|----------|-----------|
|
||||
| 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. |
|
||||
| PLAYERSYMBOLS | Select symbols count for dynamic player tags. Default is `10`. |
|
||||
|
||||
### <a href="#widconf" class="anchor" id="widconf"><span class="octicon octicon-link"></span></a>Widget configuration
|
||||
|
||||
For edited output you must open Settings window and setup output format. HTML tags work normally.
|
||||
|
||||
Available flags are in the table below.
|
||||
|
||||
**NOTE** The numbering of all arrays in variables starts at 0.
|
||||
|
||||
| Tag | Description | Since |
|
||||
|-----|-------------|-------|
|
||||
| `$time` | Time in default format. For example, `fri Nov 6 04:48:01 2013`. | 1.5.1 |
|
||||
| `$isotime` | Time in ISO format. | 1.5.2 |
|
||||
| `$shorttime` | Time in short locale format. | 1.5.2 |
|
||||
| `$longtime` | Time in long locale format. | 1.5.2 |
|
||||
| `$ctime` | Will enable custom time format. | 2.0.0 |
|
||||
| `$uptime` | System uptime, `---d--h--m`. |
|
||||
| `$cuptime` | Will enable custom uptime format. | 2.0.0 |
|
||||
| `$la1` | Load average over 1 min, `-----`. | 2.4.0 |
|
||||
| `$la5` | Load average over 5 min, `-----`. | 2.4.0 |
|
||||
| `$la15` | Load average over 15 min, `-----`. | 2.4.0 |
|
||||
| `$cpu` | Total load CPU, %, `-----`. |
|
||||
| `$cpuN` | Load CPU for core N, %, `-----`. | 1.7.0 |
|
||||
| `$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 |
|
||||
| `$mem` | Memory usage, %, `-----`. |
|
||||
| `$memmb` | Memory usage, MB, `-----`. | 1.1.1 |
|
||||
| `$memgb` | Memory usage, GB, `----`. | 1.7.3 |
|
||||
| `$memfreemb` | Free memory, MB, `-----`. | 2.0.0 |
|
||||
| `$memfreegb` | Free memory, GB, `----`. | 2.0.0 |
|
||||
| `$memtotmb` | RAM, MB, `-----`. | 1.10.0 |
|
||||
| `$memtotgb` | RAM, GB, `----`. | 1.10.0 |
|
||||
| `$memusedmb` | Used and cached memory, MB, `-----`. | 2.0.0 |
|
||||
| `$memusedgb` | Used and cached memory, GB, `----`. | 2.0.0 |
|
||||
| `$swap` | Swap usage, %, `-----`. |
|
||||
| `$swapmb` | Swap usage, MB, `-----`. | 1.1.1 |
|
||||
| `$swapgb` | Swap usage, GB, `----`. | 1.7.3 |
|
||||
| `$swapfreemb` | Free swap, MB, `-----`. | 2.0.0 |
|
||||
| `$swapfreegb` | Free swap, GB, `----`. | 2.0.0 |
|
||||
| `$swaptotmb` | Swap, MB, `-----`. | 1.10.0 |
|
||||
| `$swaptotgb` | Swap, GB, `----`. | 1.10.0 |
|
||||
| `$hddN` | Usage for mount point N, %, `-----`. For example `$hdd0`. | 1.3.2 |
|
||||
| `$hddmbN` | Usage for mount point N, MB, `-----`. For example `$hddmb0`. | 1.8.0 |
|
||||
| `$hddgbN` | Usage for mount point N, GB, `-----`. For example `$hddgb0`. | 1.8.0 |
|
||||
| `$hddfreembN` | Free space for mount point N, MB, `-----`. For example `$hddfreemb0`. | 2.0.0 |
|
||||
| `$hddfreegbN` | Free space for mount point N, GB, `-----`. For example `$hddfreegb0`. | 2.0.0 |
|
||||
| `$hddtotmbN` | Total size of mount point N, MB, `-----`. For example `$hddtotmb0`. | 1.10.0 |
|
||||
| `$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 |
|
||||
| `$downN` | Download speed for device N, KB/s or MB/s, `----`. | 2.2.0 |
|
||||
| `$downkbN` | Download speed for device N, KB/s, `----`. | 3.0.0 |
|
||||
| `$downunitsN` | Download speed units for device N, `----`. | 3.0.0 |
|
||||
| `$up` | Upload speed for active device, KB/s or MB/s, `----`. | 1.7.0 |
|
||||
| `$upkb` | Upload speed for active device, KB/s, `----`. | 3.0.0 |
|
||||
| `$upunits` | Upload speed units for active device, `----`. | 3.0.0 |
|
||||
| `$upN` | Upload speed for device N, KB/s or MB/s, `----`. | 2.2.0 |
|
||||
| `$upkbN` | Upload speed for device N, KB/s, `----`. | 3.0.0 |
|
||||
| `$upunitsN` | Upload speed units for device N, `----`. | 3.0.0 |
|
||||
| `$netdev` | Current network device. | 1.1.1 |
|
||||
| `$bat` | Average battery charge, %, `---`. |
|
||||
| `$batN` | Battery N charge, %, `---`. | 2.0.3 |
|
||||
| `$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 |
|
||||
| `$salbum` | Current song album with fixed symbols count shown with three dots at the end. | 3.0.0 |
|
||||
| `$artist` | Current song artist. One of supported music players must be installed. | 1.5.0 |
|
||||
| `$dartist` | Current song artist with fixed symbols count shown as a running line. | 3.0.0 |
|
||||
| `$sartist` | Current song artist with fixed symbols count shown with three dots at the end. | 3.0.0 |
|
||||
| `$duration` | Current song duration. One of supported music players must be installed. | 2.0.0 |
|
||||
| `$progress` | Current song progress. One of supported music players must be installed. | 1.5.3 |
|
||||
| `$title` | Current song title. One of supported music players must be installed. | 1.5.0 |
|
||||
| `$dtitle` | Current song title with fixed symbols count shown as a running line. | 3.0.0 |
|
||||
| `$stitle` | Current song title with fixed symbols count shown with three dots at the end. | 3.0.0 |
|
||||
| `$ps` | List of running processes comma separated. | 1.8.0 |
|
||||
| `$pscount` | Number of running processes. | 1.8.0 |
|
||||
| `$pstotal` | Total number of processes. | 1.8.0 |
|
||||
| `$pkgcountN` | Number of packages, which available to upgrade for command N. | 1.8.0 |
|
||||
| `$customN` | Get output from custom command N. For example `$custom0`. | 1.9.0 |
|
||||
| `$desktop` | Name of the current desktop. | 2.0.0 |
|
||||
| `$ndesktop` | Number of the current desktop. | 2.0.0 |
|
||||
| `$tdesktops` | Total number of desktops. | 2.0.0 |
|
||||
| `$askN` | Get ask for ticker N. For example `$ask0`. | 2.2.2 |
|
||||
| `$askchgN` | Get absolute ask change for ticker N. For example `$askchg0`. | 2.2.2 |
|
||||
| `$percaskchgN` | Get ask change for ticker N, %. For example `$percaskchg0`. | 2.2.2 |
|
||||
| `$bidN` | Get bid for ticker N. For example `$bid0`. | 2.2.2 |
|
||||
| `$bidchgN` | Get absolute bid change for ticker N, %. For example `$bidchg0`. | 2.2.2 |
|
||||
| `$percbidchgN` | Get bid change for ticker N. For example `$percbidchg0`. | 2.2.2 |
|
||||
| `$priceN` | Get price for ticker N. For example `$price0`. | 2.2.2 |
|
||||
| `$pricechgN` | Get absolute price change for ticker N. For example `$pricechg0`. | 2.2.2 |
|
||||
| `$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 |
|
||||
|
||||
##### <a href="#lambda" class="anchor" id="lambda"><span class="octicon octicon-link"></span></a>Lambda functions
|
||||
|
||||
Since version 3.0.0 the main widgets supports lambda functions, which are calculated at runtime. It may be declared by using `{% raw %}${{{% endraw %} {% raw %}}}{% endraw %}` construction:
|
||||
|
||||
```javascript
|
||||
{% raw %}${{{% endraw %}
|
||||
function three()
|
||||
{
|
||||
return 1+2;
|
||||
}
|
||||
three()
|
||||
{% raw %}}}{% endraw %}
|
||||
```
|
||||
|
||||
A functions inside will be interpret as JavaScript ones, any variables from main body is supported, thus the following function:
|
||||
|
||||
```javascript
|
||||
{% raw %}${{{% endraw %}
|
||||
function colorCpu()
|
||||
{
|
||||
if ($cpu > 90.0)
|
||||
return "<span style=\"color:#ff0000;\">$cpu</span>"
|
||||
else
|
||||
return "$cpu"
|
||||
}
|
||||
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:
|
||||
|
||||
```javascript
|
||||
{% raw %}${{{% endraw %}
|
||||
$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:
|
||||
|
||||
```javascript
|
||||
{% raw %}${{{% endraw %}
|
||||
function runningLine() {
|
||||
var current = "$artist - $title";
|
||||
var index = current.indexOf("$this");
|
||||
if (("$this" == "") || ((index + 20 + 1) > current.length))
|
||||
return current.substring(0, 20);
|
||||
else
|
||||
return current.substring(index + 1, index + 20 + 1);
|
||||
}
|
||||
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.
|
||||
|
||||
##### <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`.
|
||||
|
||||
**Translate strings:** Translate strings tags. Default is `true`.
|
||||
|
||||
**Wrap new lines:** Replace `\n` to `<br>`. Default is `false`.
|
||||
|
||||
**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`.
|
||||
|
||||
**Check updates:** Check updates on load. Default is `true`.
|
||||
|
||||
**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).
|
||||
|
||||
**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.
|
||||
|
||||
**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. |
|
||||
| `$HH` | Hours in 24-hours format. |
|
||||
| `$H` | Hours in 24-hours format without zero. |
|
||||
| `$mm` | Minutes. |
|
||||
| `$m` | Minutes without zero. |
|
||||
| `$ss` | Seconds. |
|
||||
| `$s` | Seconds without zero. |
|
||||
| `$t` | Timezone name. |
|
||||
| `$a`/`$ap` | am or pm. |
|
||||
| `$A`/`$AP` | AM or PM. |
|
||||
|
||||
**Custom uptime format:**
|
||||
|
||||
| | |
|
||||
|-------|--------------|
|
||||
| `$dd` | Uptime days. |
|
||||
| `$d` | Uptime days without zero. |
|
||||
| `$hh` | Uptime hours. |
|
||||
| `$h` | Uptime hours without zero. |
|
||||
| `$mm` | Uptime minutes. |
|
||||
| `$m` | Uptime minutes without zero. |
|
||||
|
||||
**AC online tag:** Line which will be shown when AC is online. 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
|
||||
|
||||
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`.
|
||||
|
||||
**MPD address:** Address of MPD server. Default is `localhost`.
|
||||
|
||||
**MPD port:** Port of MPD server. Default is `6600`.
|
||||
|
||||
### <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 for monitoring on desktops. 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`.
|
||||
|
||||
**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 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.
|
||||
|
||||
**Tooltip type:** Select tooltip type. Default is `windows`.
|
||||
|
||||
**Tooltip width:** Using tooltip width in px. Default is `200px`.
|
||||
|
||||
**Color of tooltip:** Colour which is used in some tooltip types. Default is `#ffffff`.
|
||||
|
||||
**Pattern tags**
|
||||
|
||||
| | |
|
||||
|---------|---------|
|
||||
| `$mark` | Show mark if this desktop is active. Shows spaces in other way. |
|
||||
| `$name` | Name of the desktop. |
|
||||
| `$number` | Number of the desktop. |
|
||||
| `$total` | Total number of desktops. |
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
## <a href="#gui" class="anchor" id="gui"><span class="octicon octicon-link"></span></a>Graphical user interface
|
||||
|
||||
## <a href="#screenshots" class="anchor" id="screenshots"><span class="octicon octicon-link"></span></a>Screenshots
|
||||
|
||||
<div class="thumbnails">
|
||||
{% assign scrdesc = "Widget (clickable)" %}
|
||||
{% assign scrname = "awesomewidgets_widget" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "awesomewidgets_config_01" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "awesomewidgets_config_02" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "awesomewidgets_config_03" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "awesomewidgets_config_04" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "awesomewidgets_config_05" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Tooltips" %}
|
||||
{% assign scrname = "awesomewidgets_tooltips" %}
|
||||
{% include prj_scr.html %}
|
||||
</div>
|
109
projects/_posts/2013-08-25-oblikuestrategies.md
Normal file
109
projects/_posts/2013-08-25-oblikuestrategies.md
Normal file
@ -0,0 +1,109 @@
|
||||
---
|
||||
permalink: projects/oblikuestrategies
|
||||
hastr: true
|
||||
layout: project
|
||||
title: Oblikue strategies
|
||||
short: oblikuestrategies
|
||||
tags: qt, c++, kde, linux, fun
|
||||
hasgui: true
|
||||
hasdocs: false
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
license: GPL
|
||||
links:
|
||||
- Page on <a href="//kde-look.org/content/show.php/oblikue-strategies?content=160503", title="kde-look">kde-look.org</a>
|
||||
- Archlinux <a href="//aur.archlinux.org/packages/kdeplasma-applets-oblikuestrategies", title="AUR">AUR package</a>
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
Plasmoid written on `CPP` that displays a random draw from Brian Eno and Peter Schmidt's [Oblique Strategies](//en.wikipedia.org/wiki/Oblique_strategies "Wiki"). It is [GNOME applet](//gnome-look.org/content/show.php/Oblique+Strategies?content=78405 "gnome-look") fork with some of special features.
|
||||
|
||||
<!--more-->
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
|
||||
|
||||
* Download an [archive](//github.com/arcan1s/oblikuestrategies/releases "GitHub") with latest version of source files.
|
||||
* Extract it and install the application. For global isntallation type:
|
||||
|
||||
```bash
|
||||
cd /where/is/applet/
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release ../
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
For local installation type:
|
||||
|
||||
```bash
|
||||
cd /where/is/applet/
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` -DCMAKE_BUILD_TYPE=Release ../
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
* Restart plasma to load the applet:
|
||||
|
||||
```bash
|
||||
kquitapp plasma-desktop && sleep 2 && plasma-desktop
|
||||
```
|
||||
|
||||
Also you might need to run `kbuildsycoca4` in order to get the `*.desktop` file recognized:
|
||||
|
||||
```bash
|
||||
kbuildsycoca4 &> /dev/null
|
||||
```
|
||||
|
||||
### <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.
|
||||
|
||||
* kdebase-workspace
|
||||
* automoc4 *(make)*
|
||||
* cmake *(make)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
Open your Plasma widgets and select `Oblikue strategies`.
|
||||
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
## <a href="#config" class="anchor" id="config"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
Right click on widget.
|
||||
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
## <a href="#gui" class="anchor" id="gui"><span class="octicon octicon-link"></span></a>Graphical user interface
|
||||
|
||||
### <a href="#screenshots" class="anchor" id="screenshots"><span class="octicon octicon-link"></span></a>Screenshots
|
||||
|
||||
<div class="thumbnails">
|
||||
{% assign scrdesc = "Widget" %}
|
||||
{% assign scrname = "oblikuestrategies_widget" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Configuration window" %}
|
||||
{% assign scrname = "oblikuestrategies_config" %}
|
||||
{% include prj_scr.html %}
|
||||
</div>
|
||||
<!-- end of gui block -->
|
155
projects/_posts/2013-12-20-queued.md
Normal file
155
projects/_posts/2013-12-20-queued.md
Normal file
@ -0,0 +1,155 @@
|
||||
---
|
||||
permalink: projects/queued
|
||||
hastr: true
|
||||
layout: project
|
||||
title: queued
|
||||
short: queued
|
||||
tags: linux, shell, daemon, system
|
||||
hasgui: false
|
||||
hasdocs: false
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
license: GPLv3
|
||||
links:
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
Daemon for starting jobs to queue of calculations. It was written as proof-of-concept.
|
||||
|
||||
<!--more-->
|
||||
|
||||
```bash
|
||||
$ queued --help
|
||||
Simple daemon written on BASH for starting jobs to queue of calculations
|
||||
|
||||
Usage: queued [ -c /etc/queued.conf ] [ -v | --version ] [ -h | --help ]
|
||||
Parametrs:
|
||||
-c PATH - path to configuration file. Default is '/etc/queued.conf'
|
||||
|
||||
-v --version - show version and exit
|
||||
-h --help - show this help and exit
|
||||
```
|
||||
|
||||
```bash
|
||||
$ add_queued --help
|
||||
add_queued [ -c /etc/queued.conf ] [ -p NUM ] [ -u USER ] [ -h | --help ] /path/to/script
|
||||
|
||||
Parameters:
|
||||
-c PATH - path to configuration file. Default is '/etc/queued.conf'
|
||||
-p NUM - job priority
|
||||
-u USER - username
|
||||
-h --help - show this help and exit
|
||||
```
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
|
||||
|
||||
* Download an [archive](//github.com/arcan1s/queued/releases "GitHub") with latest version of source files.
|
||||
* Extract it and install the application:
|
||||
|
||||
```bash
|
||||
./install.sh "/path/to/root/"
|
||||
```
|
||||
|
||||
If you want install it to `/` you must run it as root, e.g.:
|
||||
|
||||
```bash
|
||||
sudo ./install.sh
|
||||
```
|
||||
|
||||
If no path is specified it will be installed to `/` by default.
|
||||
|
||||
### <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.
|
||||
|
||||
* Bash (including awk, grep, sed)
|
||||
* systemd *(optional, service file)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
If you want to start the daemon just run
|
||||
|
||||
```bash
|
||||
systemctl start queued
|
||||
```
|
||||
|
||||
If you want to enable daemon autoload run
|
||||
|
||||
```bash
|
||||
systemctl enable queued
|
||||
```
|
||||
|
||||
But you may change path to configuration file or change parameters. To do it just copy (recommended) the source configuration file to new path
|
||||
|
||||
```bash
|
||||
cp /etc/queued.conf /path/to/new/queued.conf
|
||||
```
|
||||
|
||||
and edit it. Then copy the source service file to `/etc`:
|
||||
|
||||
```bash
|
||||
cp /usr/lib/systemd/system/queued.service /etc/systemd/system/queued-my-profile.service
|
||||
```
|
||||
|
||||
Replace following string in the file:
|
||||
|
||||
```bash
|
||||
ExecStart=/usr/bin/queued
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```bash
|
||||
ExecStart=/usr/bin/queued -c /path/to/new/queued.conf
|
||||
```
|
||||
|
||||
### <a href="#adding" class="anchor" id="adding"><span class="octicon octicon-link"></span></a>Adding a job
|
||||
|
||||
1. Create shell script with the command (e.g. it have a name `script.sh`).
|
||||
2. Create priority file (`script.sh.pr`) with the job priority if it is needed.
|
||||
3. Create user file (`script.sh.user`) with the job username if it is needed.
|
||||
4. Copy files to `$WORKDIR`.
|
||||
|
||||
Also you may use `add_queued`.
|
||||
|
||||
## <a href="#configuration" class="anchor" id="configuration"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
All settings are stored in `/etc/queued.conf`. After edit them you must restart daemon
|
||||
|
||||
```bash
|
||||
systemctl restart queued
|
||||
```
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
### <a href="#options" class="anchor" id="options"><span class="octicon octicon-link"></span></a>Options
|
||||
|
||||
| | |
|
||||
|---------|---------|
|
||||
| WORKDIR | Full path to directory with source jobs. Default is `/var/lib/queued/work`. This directory must contain source scripts `script-name`, a priority file (it is not necessary) `script-name.pr` and a file with username (it is not necessary too) `script-name.user`. |
|
||||
| JOBDIR | Full path to directory with running jobs. Default is `/var/lib/queued/job`. All job files will be moved here. |
|
||||
| QUEUEFILE | Full path to file with queue list. Default is `/var/lib/queued/queue`. |
|
||||
| PRIORITY | Default priority. Default is `0`. The higher the value, the higher the priority of the task. |
|
||||
| SLEEPTIME | Time interval in minutes. Default is `5`. |
|
||||
| STARTASUSER | Default user. Default is `root`. This user will own created files. |
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
<!-- end of gui block -->
|
205
projects/_posts/2014-01-30-netctl-gui.md
Normal file
205
projects/_posts/2014-01-30-netctl-gui.md
Normal file
@ -0,0 +1,205 @@
|
||||
---
|
||||
permalink: projects/netctl-gui
|
||||
hastr: true
|
||||
layout: project
|
||||
title: Netctl GUI
|
||||
short: netctl-gui
|
||||
tags: archlinux, c++, qt, network, kde, netctl, system, dbus, library
|
||||
hasgui: true
|
||||
hasdocs: true
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
- nosada (Japanese translation)
|
||||
license: GPLv3
|
||||
links:
|
||||
- Page on <a href="//linux.softpedia.com/get/System/Networking/Netctl-GUI-103383.shtml" title="Softpedia">Softpedia</a>
|
||||
- Page on <a href="//kde-apps.org/content/show.php?content=164490" title="kde-apps">kde-apps.org</a>
|
||||
- <a href="//aur.archlinux.org/pkgbase/netctl-gui/" title="AUR">AUR package</a>
|
||||
- <a href="/devs/netctl-gui-dbus-api.html" title="DBus API">DBus API reference</a>
|
||||
- <a href="/devs/netctl-gui-security-notes.html" title="Security">Security notes</a>
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
Graphical interface for `netctl` (several scripts for work with network connection in Archlinux). It is written on `C++` using `Qt` library. Now it may work with profiles and may create new profiles. Also it may create a connection to WiFi. Moreover, it provides a Qt library for interaction with netctl and widget and DataEngine for KDE4/KF5.
|
||||
|
||||
<!--more-->
|
||||
|
||||
**NOTE:** [LOOKING FOR TRANSLATORS!](//github.com/arcan1s/netctl-gui/issues/3 "Ticket")
|
||||
|
||||
```bash
|
||||
$ netctl-gui --help
|
||||
Usage:
|
||||
netctl-gui [ options ]
|
||||
Options:
|
||||
Open window:
|
||||
--detached - start detached from console
|
||||
--maximized - start maximized
|
||||
--minimized - start minimized to tray
|
||||
--about - show about window
|
||||
--netctl-auto - show netctl-auto window
|
||||
--settings - show settings window
|
||||
Functions:
|
||||
-e, --essid <arg> - select this ESSID
|
||||
-o, --open <arg> - open this profile
|
||||
-s, --select <arg> - select this profile
|
||||
Additional flags:
|
||||
-c, --config <arg> - read configuration from this file
|
||||
-d, --debug - print debug information
|
||||
--default - start with default settings
|
||||
--set-opts <arg> - set options for this run, comma separated
|
||||
-t, --tab <arg> - open a tab with this number
|
||||
Show messages:
|
||||
-v, --version - show version and exit
|
||||
-i, --info - show build information and exit
|
||||
-h, --help - show this help and exit
|
||||
```
|
||||
|
||||
```bash
|
||||
$ netctlgui-helper --help
|
||||
Usage:
|
||||
netctlgui-helper [ options ]
|
||||
Options:
|
||||
-c, --config <arg> - read configuration from this file
|
||||
-d, --debug - print debug information
|
||||
--nodaemon - do not start as daemon
|
||||
--replace - force replace the existing session
|
||||
--restore - force restore the existing session
|
||||
--system - do not read user configuration, system-wide only
|
||||
Show messages:
|
||||
-v, --version - show version and exit
|
||||
-i, --info - show build information and exit
|
||||
-h, --help - show this help and exit
|
||||
```
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
### <a href="#changelog" class="anchor" id="changelog"><span class="octicon octicon-link"></span></a>Changelog
|
||||
|
||||
[CHANGELOG](//github.com/arcan1s/netctl-gui/blob/master/CHANGELOG "GitHub")
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
|
||||
|
||||
* Download an [archive](//github.com/arcan1s/netctl-gui/releases "GitHub") with latest version of source files.
|
||||
* Extract it and install the application. If you want install it into `/`, you should run as root following commands:
|
||||
|
||||
```bash
|
||||
cd /path/to/extracted/archive
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Available cmake flags are:
|
||||
|
||||
* components:
|
||||
* `-DBUILD_DATAENGINE:BOOL=0` - do not build DataEngine
|
||||
* `-DBUILD_GUI:BOOL=0` - do not build GUI
|
||||
* `-DBUILD_HELPER:BOOL=0` - do not build helper daemon
|
||||
* `-DBUILD_LIBRARY:BOOL=0` - do not build library
|
||||
* `-DBUILD_PLASMOID:BOOL=0` - do not build Plasmoid
|
||||
* additional components:
|
||||
* `-DBUILD_DOCS:BOOL=0` - do not build developer documentation
|
||||
* `-DBUILD_TEST:BOOL=1` - build auto tests for the library and the helper
|
||||
* project properties:
|
||||
* `-DDBUS_SYSTEMCONF_PATH=/etc/dbus-1/system.d/` - path to DBus system configuration files
|
||||
* `-DSYSTEMD_SERVICE_PATH=lib/systemd/system` - path to systemd services
|
||||
* `-DUSE_CAPABILITIES:BOOL=0` - do not use setcap to get privileges to the helper
|
||||
* `-DBUILD_KDE4:BOOL=1` - build plasmoid under KDE4 instead of KF5
|
||||
* `-DUSE_QT5:BOOL=0` - use Qt4 instead of Qt5 for GUI
|
||||
|
||||
### <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.
|
||||
|
||||
* netctl
|
||||
* qt5-base *(if Qt5 is used)* **or** qt4 *(if Qt4 is used)*
|
||||
* automoc4 *(make)*
|
||||
* cmake *(make)*
|
||||
* qt5-tools *(make, if Qt5 is used)*
|
||||
* kdebase-workspace *(optional, KDE4 widget)*
|
||||
* plasma-frameworks *(optional, KF5 widget)*
|
||||
* sudo *(optional, sudo support)*
|
||||
* wpa_supplicant *(optional, WiFi support)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
Just run application `netctl-gui`. If it is needed (and if you use KDE), you may add widget `netctl`, which provides by the application.
|
||||
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
## <a href="#config" class="anchor" id="config"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
It is recommended to use graphical interface for configuration. Configuration files are:
|
||||
|
||||
* UI and helper
|
||||
* `$HOME/.config/netctl-gui.conf` - GUI/helper user configuration
|
||||
* `/etc/netctl-gui.conf` - helper system-wide configuration
|
||||
* DataEngine (KDE4 version)
|
||||
* `$KDEHOME/share/config/plasma-dataengine-netctl.conf` - DataEngine user configuration
|
||||
* `$KDESYSTEM/share/config/plasma-dataengine-netctl.conf` - DataEngine system-wide configuration
|
||||
* DataEngine (KF5 version)
|
||||
* `$HOME/.config/plasma-dataengine-netctl.conf` - DataEngine user configuration
|
||||
* `/etc/xdg/plasma-dataengine-netctl.conf` - DataEngine system-wide configuration
|
||||
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
## <a href="#gui" class="anchor" id="gui"><span class="octicon octicon-link"></span></a>Graphical user interface
|
||||
|
||||
Graphical interface provides by `netctl-gui` application.
|
||||
|
||||
### <a name="screenshots" class="anchor" href="#screenshots"><span class="octicon octicon-link"></span></a>Screenshots
|
||||
|
||||
<div class="thumbnails">
|
||||
{% assign scrdesc = "DataEngine" %}
|
||||
{% assign scrname = "netctl-gui_dataengine" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Widget" %}
|
||||
{% assign scrname = "netctl-gui_plasmoid" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Widget settings window" %}
|
||||
{% assign scrname = "netctl-gui_plasmoid_conf_01" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Widget settings window" %}
|
||||
{% assign scrname = "netctl-gui_plasmoid_conf_02" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Widget settings window" %}
|
||||
{% assign scrname = "netctl-gui_plasmoid_conf_03" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Main window" %}
|
||||
{% assign scrname = "netctl-gui_main" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Profile window" %}
|
||||
{% assign scrname = "netctl-gui_profile" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "WiFi window" %}
|
||||
{% assign scrname = "netctl-gui_wifi" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "About window" %}
|
||||
{% assign scrname = "netctl-gui_about" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "netctl-auto window" %}
|
||||
{% assign scrname = "netctl-gui_netctl-auto" %}
|
||||
{% include prj_scr.html %}
|
||||
{% assign scrdesc = "Settings window" %}
|
||||
{% assign scrname = "netctl-gui_settings" %}
|
||||
{% include prj_scr.html %}
|
||||
</div>
|
||||
<!-- end of gui block -->
|
159
projects/_posts/2014-07-27-reportabug.md
Normal file
159
projects/_posts/2014-07-27-reportabug.md
Normal file
@ -0,0 +1,159 @@
|
||||
---
|
||||
permalink: projects/reportabug
|
||||
hastr: true
|
||||
layout: project
|
||||
title: Report a Bug
|
||||
short: reportabug
|
||||
tags: qt, c++, library, development
|
||||
hasgui: false
|
||||
hasdocs: true
|
||||
developers:
|
||||
- Evgeniy Alekseev
|
||||
license: LGPLv3
|
||||
links:
|
||||
---
|
||||
<!-- info block -->
|
||||
|
||||
Qt application/library which allows users to create an issue for projects which are hosted on GitHub. It may work over [GitHub](//github.com "GitHub") or [GitReport](//gitreports.com/ "GitReports"). It works fine, but it was created as proof-of-concept.
|
||||
|
||||
<!--more-->
|
||||
|
||||
### <a href="#devel" class="anchor" id="devel"><span class="octicon octicon-link"></span></a>Developers and contributors
|
||||
|
||||
{% for devel in page.developers %}
|
||||
* {{ devel }}{% endfor %}
|
||||
|
||||
### <a href="#license" class="anchor" id="license"><span class="octicon octicon-link"></span></a>License
|
||||
|
||||
* {{ page.license }}
|
||||
|
||||
<!-- end of info block -->
|
||||
|
||||
<!-- install block -->
|
||||
## <a href="#install" class="anchor" id="install"><span class="octicon octicon-link"></span></a>Installation
|
||||
|
||||
### <a href="#instruction" class="anchor" id="instruction"><span class="octicon octicon-link"></span></a>Instruction
|
||||
|
||||
#### <a href="#singleapp" class="anchor" id="singleapp"><span class="octicon octicon-link"></span></a>Build as a standalone application
|
||||
|
||||
* Download the actual source [tarball](//github.com/arcan1s/reportabug/releases "GitHub").
|
||||
* Extract it and set up your configuration.
|
||||
* Install the application:
|
||||
|
||||
```bash
|
||||
cd /path/to/extracted/archive
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_AS_LIBRARY:BOOL=0 ../
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
#### <a href="#aslibrary" class="anchor" id="aslibrary"><span class="octicon octicon-link"></span></a>Build as a library in your project
|
||||
|
||||
* Download the actual source [tarball](//github.com/arcan1s/reportabug/releases "GitHub").
|
||||
* Extract it and set up your configuration.
|
||||
* include it into your project. For example if you use `cmake`:
|
||||
|
||||
```cmake
|
||||
add_subdirectory (reportabug)
|
||||
```
|
||||
|
||||
* Declare class in you sources. For example:
|
||||
|
||||
```cpp
|
||||
Reportabug *reportWindow = new Reportabug(parent=this, debugCmd=false, params=0);
|
||||
reportWindow->showWindow();
|
||||
```
|
||||
|
||||
* Link your application with this library.
|
||||
|
||||
#### <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_DOCS=1` - build developer documentation.
|
||||
* `-DBUILD_SHARED_LIBRARY=1` - build the shared library instead of static one.
|
||||
* `-DENABLE_GITHUB=0` - disable GitHub module.
|
||||
* `-DENABLE_GITREPORT=0` - disable GitReport module.
|
||||
* `-DOWN_GITHUB_TOKEN=STRING` - use STRING as own GitHub token.
|
||||
* `-DUSE_QT5=0` - use Qt4 instead of Qt5.
|
||||
|
||||
### <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.
|
||||
|
||||
* qt5-base *(if Qt5 is used)* **or** qt4 *(if Qt4 is used)*
|
||||
* qt5-network (if Qt5 is used)
|
||||
* automoc4 *(make)*
|
||||
* cmake *(make)*
|
||||
* doxygen *(make, documentation)*
|
||||
* qt5-webkit (if Qt5 is used) **or** qtwebkit (if Qt4 is used) *(optional, required by GitReports module)*
|
||||
|
||||
<!-- end of install block -->
|
||||
|
||||
<!-- howto block -->
|
||||
## <a href="#howto" class="anchor" id="howto"><span class="octicon octicon-link"></span></a>How to use
|
||||
|
||||
### <a href="#github" class="anchor" id="github"><span class="octicon octicon-link"></span></a>GitHub module
|
||||
|
||||
This module creates an issue over GitHub. [GitHub API](//developer.github.com/v3/issues/ "Documentation") is used for creating issue. User should type own username and password. The typical POST request is:
|
||||
|
||||
```bash
|
||||
curl -X POST -u user:pass -d '{"title":"A new bug","body":"Some error occurs"}' \
|
||||
//api.github.com/repos/owner/repo/issues
|
||||
```
|
||||
|
||||
To disable this module use `-DENABLE_GITHUB=0` cmake flag.
|
||||
|
||||
This module may send request using developer's token too. Please visit [this page](//github.com/settings/applications "Settings") and generate a new one. Needed scopes are `public_repo` (or `repo` if you will use it for a private repository).
|
||||
|
||||
**Please keep in mind that passing the token in the clear, you may discredit your account.**
|
||||
|
||||
The typical POST request is:
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: token token" -d '{"title":"A new bug","body":"Some error occurs"}' \
|
||||
//api.github.com/repos/owner/repo/issues
|
||||
```
|
||||
|
||||
To enable this module set up your token using `-DOWN_GITHUB_TOKEN=0` cmake flag.
|
||||
|
||||
This module requires `QtNetwork` module.
|
||||
|
||||
### <a href="#gitreports" class="anchor" id="gitreports"><span class="octicon octicon-link"></span></a>GitReports module
|
||||
|
||||
This module creates issue over [GitReports](//gitreports.com/about "GitReports"). Please visit [this page](//gitreports.com/ "GitReports") and set up it for your repository.
|
||||
|
||||
To disable this module use `-DENABLE_GITREPORT=0` cmake flag. This module requires `QtNetwork` and `QtWebKit` modules.
|
||||
|
||||
<!-- end of howto block -->
|
||||
|
||||
<!-- config block -->
|
||||
## <a href="#config" class="anchor" id="config"><span class="octicon octicon-link"></span></a>Configuration
|
||||
|
||||
For the developer configuration please use `config.h` header. Also you may load parametrs dynamically using `params` array (needed keys is the same as for the header
|
||||
|
||||
### <a href="#mainconfig" class="anchor" id="mainconfig"><span class="octicon octicon-link"></span></a>Main configuration
|
||||
|
||||
* `OWNER` - the owner of the source repository.
|
||||
* `PROJECT` - the project name.
|
||||
* `TAG_BODY` - default body of an issue. It may be used for both modules.
|
||||
* `TAG_TITLE` - default title of an issue. It may be used only for GitHub module.
|
||||
* `TAG_ASSIGNEE` - assign an issue to this account. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||
* `TAG_LABELS` - set these labels to an issue. Labels should be comma separated. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||
* `TAG_MILESTONE` - set this milestone to an issue. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||
|
||||
### <a href="#githubconfig" class="anchor" id="githubconfig"><span class="octicon octicon-link"></span></a>GitHub module settings
|
||||
|
||||
* `GITHUB_COMBOBOX` - text of this module into comboBox.
|
||||
* `ISSUES_URL` - issues url, in the most cases do not touch it. Default is `//api.github.com/repos/$OWNER/$PROJECT/issues`. Available tags here are `$PROJECT`, `$OWNER`.
|
||||
|
||||
### <a href="#gitreportsconfig" class="anchor" id="gitreportsconfig"><span class="octicon octicon-link"></span></a>GitReports module settings
|
||||
|
||||
* `CAPTCHA_URL` - captcha url, in the most cases do not touch it. Default is `//gitreports.com/simple_captcha?code=`.
|
||||
* `GITREPORT_COMBOBOX` - text of this module into comboBox.
|
||||
* `PUBLIC_URL` - issues url, in the most cases do not touch it. Default is `//gitreports.com/issue/$OWNER/$PROJECT`. Available tags here are `$PROJECT`, `$OWNER`.
|
||||
|
||||
<!-- end of config block -->
|
||||
|
||||
<!-- gui block -->
|
||||
<!-- end of gui block -->
|
Reference in New Issue
Block a user