mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
edit supported information
update desktop panel to tag changes
This commit is contained in:
parent
fd81fda9a1
commit
54174974b1
11
PKGBUILD
11
PKGBUILD
@ -1,12 +1,12 @@
|
|||||||
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>
|
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>
|
||||||
|
|
||||||
pkgname=kdeplasma-applets-pytextmonitor
|
pkgname=kdeplasma-applets-awesome-widgets
|
||||||
_pkgname=pytextmonitor
|
_pkgname=awesome-widgets
|
||||||
pkgver=1.11.0
|
pkgver=1.11.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Minimalistic Plasmoid script written on Python2. It looks like widgets in Awesome WM"
|
pkgdesc="Collection of minimalistic Plasmoids which looks like Awesome WM widgets"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://arcanis.name/projects/pytextmonitor"
|
url="http://arcanis.name/projects/awesome-widgets"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
depends=('kdebase-workspace' 'kdebindings-python2' 'lm_sensors')
|
depends=('kdebase-workspace' 'kdebindings-python2' 'lm_sensors')
|
||||||
optdepends=("amarok: for music player monitor"
|
optdepends=("amarok: for music player monitor"
|
||||||
@ -19,11 +19,10 @@ optdepends=("amarok: for music player monitor"
|
|||||||
"qmmp: for music player monitor"
|
"qmmp: for music player monitor"
|
||||||
"sysstat: for popup messages")
|
"sysstat: for popup messages")
|
||||||
makedepends=('automoc4' 'cmake')
|
makedepends=('automoc4' 'cmake')
|
||||||
source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
md5sums=('23b3f2f2d0a8bd87354d721cbf43ee22')
|
md5sums=('23b3f2f2d0a8bd87354d721cbf43ee22')
|
||||||
backup=('usr/share/config/extsysmon.conf')
|
backup=('usr/share/config/extsysmon.conf')
|
||||||
changelog=CHANGELOG
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
rm -rf "${srcdir}/build"
|
rm -rf "${srcdir}/build"
|
||||||
|
218
README.md
218
README.md
@ -1,79 +1,83 @@
|
|||||||
pytextmonitor
|
awesome-widgets
|
||||||
=============
|
===============
|
||||||
|
|
||||||
Information
|
Information
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
|
A collection of minimalistic widgets which looks like Awesome WM widgets.
|
||||||
|
|
||||||
**NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/pytextmonitor/issues/14)
|
**NOTE** [LOOKING FOR TRANSLATORS!](https://github.com/arcan1s/awesome-widgets/issues/14)
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
For edited output you must open Settings window and setup output format in lines:
|
For edited output you must open Settings window and setup output format in lines:
|
||||||
|
|
||||||
* tag `$time` - time in default format. For example, *fri Nov 6 04:48:01 2013*
|
* tag `$time$` - time in default format. For example, *fri Nov 6 04:48:01 2013*
|
||||||
* tag `$isotime` - time in iso format
|
* tag `$isotime$` - time in iso format
|
||||||
* tag `$shorttime` - time in short locale format
|
* tag `$shorttime$` - time in short locale format
|
||||||
* tag `$longtime` - time in long locale format
|
* tag `$longtime$` - time in long locale format
|
||||||
* tag `$custom` - custom time format
|
* tag `$ctime$` - custom time format
|
||||||
* tag `$uptime` - uptime, *---d--h--m*
|
* tag `$uptime$` - uptime, *---d--h--m*
|
||||||
* tag `$custom` - custom uptime format
|
* tag `$cuptime$` - custom uptime format
|
||||||
* tag `$cpu` - total load cpu, *%*
|
* tag `$cpu$` - total load cpu, *%*
|
||||||
* tag `$cpuN` - load CPU for core N, *%*
|
* tag `$cpuN$` - load CPU for core N, *%*
|
||||||
* tag `$cpucl` - average cpu clock, *MHz*
|
* tag `$cpucl$` - average cpu clock, *MHz*
|
||||||
* tag `$cpuclN` - cpu clock for core N, *MHz*
|
* tag `$cpuclN$` - cpu clock for core N, *MHz*
|
||||||
* tag `$tempN` - temperature for device N. For example, `$temp0`
|
* tag `$tempN$` - temperature for device N. For example, `$temp0`
|
||||||
* tag `$gpu` - GPU usage, *%*. `aticonfig` or `nvidia-smi` must be installed
|
* tag `$gpu$` - GPU usage, *%*. `aticonfig` or `nvidia-smi` must be installed
|
||||||
* tag `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
|
* tag `$gputemp$` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
|
||||||
* tag `$mem` - usage memory, *%*
|
* tag `$mem$` - usage memory, *%*
|
||||||
* tag `$memmb` - usage memory, *MB*
|
* tag `$memmb$` - usage memory, *MB*
|
||||||
* tag `$memgb` - usage memory, *GB*
|
* tag `$memgb$` - usage memory, *GB*
|
||||||
* tag `$memtotmb` - total RAM, *MB*
|
* tag `$memfreemb$` - free RAM, *MB*
|
||||||
* tag `$memtotgb` - total RAM, *GB*
|
* tag `$memfreegb$` - free RAM, *GB*
|
||||||
* tag `$swap` - swap, *%*
|
* tag `$memtotmb$` - total RAM, *MB*
|
||||||
* tag `$swapmb` - swap, *MB*
|
* tag `$memtotgb$` - total RAM, *GB*
|
||||||
* tag `$swapgb` - swap, *GB*
|
* tag `$memusedmb$` - used and cached RAM, *MB*
|
||||||
* tag `$swaptotmb` - total swap, *MB*
|
* tag `$memusedgb$` - used and cached RAM, *GB*
|
||||||
* tag `$swaptotgb` - total swap, *GB*
|
* tag `$swap$` - swap, *%*
|
||||||
* tag `$hddN` - usage for mount point N, *%*. For example, `$hdd0`
|
* tag `$swapmb$` - swap, *MB*
|
||||||
* tag `$hddmbN` - usage for mount point N, *MB*. For example, `$hddmb0`
|
* tag `$swapgb$` - swap, *GB*
|
||||||
* tag `$hddgbN` - usage for mount point N, *GB*. For example, `$hddgb0`
|
* tag `$swapfreemb$` - free swap, *MB*
|
||||||
* tag `$hddtotmbN` - total size of mount point N, *MB*. For example, `$hddtotmb0`
|
* tag `$swapfreegb$` - free swap, *GB*
|
||||||
* tag `$hddtotgbN` - total size of mount point N, *GB*. For example, `$hddtotgb0`
|
* tag `$swaptotmb$` - total swap, *MB*
|
||||||
* tag `$hddrN` - read speed of disk N, *KB/s*. For example, `$hddr0`
|
* tag `$swaptotgb$` - total swap, *GB*
|
||||||
* tag `$hddwN` - write speed of disk N, *KB/s*. For example, `$hddw0`
|
* tag `$hddN$` - usage for mount point N, *%*. For example, `$hdd0`
|
||||||
* tag `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
|
* tag `$hddmbN$` - usage for mount point N, *MB*. For example, `$hddmb0`
|
||||||
* tag `$down` - download speed, *KB/s*
|
* tag `$hddgbN$` - usage for mount point N, *GB*. For example, `$hddgb0`
|
||||||
* tag `$up` - upload speed, *KB/s*
|
* tag `$hddfreembN$` - free space for mount point N, *MB*. For example, `$hddfreemb0`
|
||||||
* tag `$netdev` - current network device
|
* tag `$hddfreegbN$` - free space for mount point N, *GB*. For example, `$hddfreegb0`
|
||||||
* tag `$bat` - battery charge, *%*
|
* tag `$hddtotmbN$` - total size of mount point N, *MB*. For example, `$hddtotmb0`
|
||||||
* tag `$ac` - status AC device. Return (\*) if AC device is online or *( )* if offline
|
* tag `$hddtotgbN$` - total size of mount point N, *GB*. For example, `$hddtotgb0`
|
||||||
* tag `$album` - current song album. One of supported music players must be installed
|
* tag `$hddrN$` - read speed of disk N, *KB/s*. For example, `$hddr0`
|
||||||
* tag `$artist` - current song artist. One of supported music players must be installed
|
* tag `$hddwN$` - write speed of disk N, *KB/s*. For example, `$hddw0`
|
||||||
* tag `$progress` - current song progress. One of supported music players must be installed
|
* tag `$hddtempN$` - temperature for HDD N. For example, `$hddtemp0`
|
||||||
* tag `$time` - current song duration. One of supported music players must be installed
|
* tag `$down$` - download speed, *KB/s*
|
||||||
* tag `$title` - current song title. One of supported music players must be installed
|
* tag `$up$` - upload speed, *KB/s*
|
||||||
* tag `$pscount` - number of running processes
|
* tag `$netdev$` - current network device
|
||||||
* tag `$pstotal` - total number of processes
|
* tag `$bat$` - battery charge, *%*
|
||||||
* tag `$ps` - list of running processes
|
* tag `$ac$` - status AC device. Return (\*) if AC device is online or *( )* if offline
|
||||||
* tag `$pkgcountN` - number of packages, which available to upgrade for command N. For example, `$pkgcount0`
|
* tag `$album$` - current song album. One of supported music players must be installed
|
||||||
* tag `$customN` - returns output for custom command N. For example, `$custom0`
|
* tag `$artist$` - current song artist. One of supported music players must be installed
|
||||||
* tag `$name` - name of the current desktop
|
* tag `$duration$` - current song duration. One of supported music players must be installed
|
||||||
* tag `$number` - number of the current desktop
|
* tag `$progress$` - current song progress. One of supported music players must be installed
|
||||||
* tag `$total` - total number of desktops
|
* tag `$title$` - current song title. One of supported music players must be installed
|
||||||
|
* tag `$pscount$` - number of running processes
|
||||||
Label order will changed if you change slider position. HTML tags in label work normally.
|
* tag `$pstotal$` - total number of processes
|
||||||
|
* tag `$ps$` - list of running processes
|
||||||
**NOTE** you don't may set to show `$cpu` tag in swap label for example. **`$cpu` will work only in cpu label**.
|
* tag `$pkgcountN$` - number of packages, which available to upgrade for command N. For example, `$pkgcount0`
|
||||||
|
* tag `$customN$` - returns output for custom command N. For example, `$custom0`
|
||||||
|
* tag `$desktop$` - name of the current desktop
|
||||||
|
* tag `$ndesktop$` - number of the current desktop
|
||||||
|
* tag `$tdesktops$` - total number of desktops
|
||||||
|
|
||||||
Tips & tricks
|
Tips & tricks
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
You may use different colors for labels. Just put label text into html code. See [issue](https://github.com/arcan1s/pytextmonitor/issues/9) for more details.
|
You may use different colors for labels. Just put label text into html code. See [issue](https://github.com/arcan1s/awesome-widgets/issues/9) for more details.
|
||||||
|
|
||||||
Numbering of elements of temperature, HDD usage, HDD speed, HDD temperature refers to elements order from second tab (*Advanced settings*). You should add item to the required listWidget first. And the first element in the listWidget will be `$tag0`. See [issue](https://github.com/arcan1s/pytextmonitor/issues/17) for more details.
|
Numbering of elements of temperature, HDD usage, HDD speed, HDD temperature refers to elements order from second tab (*Advanced settings*). You should add item to the required listWidget first. And the first element in the listWidget will be `$tag0`. See [issue](https://github.com/arcan1s/awesome-widgets/issues/17) for more details.
|
||||||
|
|
||||||
Advanced settings
|
Advanced settings
|
||||||
-----------------
|
-----------------
|
||||||
@ -96,63 +100,55 @@ Add stretch (spacer) to the selected side of the widget.
|
|||||||
|
|
||||||
**Custom time**
|
**Custom time**
|
||||||
|
|
||||||
* tag `$dddd` - weekday in long format
|
* tag `$dddd$` - weekday in long format
|
||||||
* tag `$ddd` - weekday in short format
|
* tag `$ddd$` - weekday in short format
|
||||||
* tag `$dd` - day
|
* tag `$dd$` - day
|
||||||
* tag `$d` - day without zero
|
* tag `$d$` - day without zero
|
||||||
* tag `$MMMM` - month in long format
|
* tag `$MMMM$` - month in long format
|
||||||
* tag `$MMM` - month in short format
|
* tag `$MMM$` - month in short format
|
||||||
* tag `$MM` - month
|
* tag `$MM$` - month
|
||||||
* tag `$M` - month without zero
|
* tag `$M$` - month without zero
|
||||||
* tag `$yyyy` - year
|
* tag `$yyyy$` - year
|
||||||
* tag `$yy` - year in short format
|
* tag `$yy$` - year in short format
|
||||||
* tag `$hh` - hours
|
* tag `$hh$` - hours
|
||||||
* tag `$h` - hours without zero
|
* tag `$h$` - hours without zero
|
||||||
* tag `$mm` - minutes
|
* tag `$mm$` - minutes
|
||||||
* tag `$m` - minutes without zero
|
* tag `$m$` - minutes without zero
|
||||||
* tag `$ss` - seconds
|
* tag `$ss$` - seconds
|
||||||
* tag `$s` - seconds without zero
|
* tag `$s$` - seconds without zero
|
||||||
|
|
||||||
**Custom uptime**
|
**Custom uptime**
|
||||||
|
|
||||||
* tag `$dd` - uptime days
|
* tag `$dd$` - uptime days
|
||||||
* tag `$d` - uptime days without zero
|
* tag `$d$` - uptime days without zero
|
||||||
* tag `$hh` - uptime hours
|
* tag `$hh$` - uptime hours
|
||||||
* tag `$h` - uptime hours without zero
|
* tag `$h$` - uptime hours without zero
|
||||||
* tag `$mm` - uptime minutes
|
* tag `$mm$` - uptime minutes
|
||||||
* tag `$m` - uptime minutes without zero
|
* tag `$m$` - uptime minutes without zero
|
||||||
|
|
||||||
**Temperature units**
|
**Temperature units**
|
||||||
|
|
||||||
Select units for temperature. Available units are Celsius, Farenheit and Kelvin.
|
Select units for temperature. Available units are Celsius, Farenheit, Kelvin, Reaumur, cm^-1, kJ/mol, kcal/mol.
|
||||||
|
|
||||||
**Temperature devices**
|
**Temperature devices**
|
||||||
|
|
||||||
List of devices, which will be observed in temp label (combo box items come from `sensors`). List widget is editable, delete key will remove current item.
|
List of devices, which will be observed in temp label (items come from `sensors`). List widget is editable,
|
||||||
|
|
||||||
**Mount points**
|
**Mount points**
|
||||||
|
|
||||||
List of mount points, which will be observed in hdd label (combo box items come from `mount`). List widget is editable, delete key will remove current item.
|
List of mount points, which will be observed in hdd label (items come from `mount`). List widget is editable.
|
||||||
|
|
||||||
**HDD (speed)**
|
**HDD (speed)**
|
||||||
|
|
||||||
List of hard disk devices, which will be observed in hddspeed label (combo box items come from DataEngine). List widget is editable, delete key will remove current item.
|
List of hard disk devices, which will be observed in hddspeed label (items come from DataEngine). List widget is editable.
|
||||||
|
|
||||||
**HDD (temperature)**
|
**HDD (temperature)**
|
||||||
|
|
||||||
List of hard disk devices, which will be observed in hddtemp label (combo box items come from `find`). List widget is editable, delete key will remove current item.
|
List of hard disk devices, which will be observed in hddtemp label (items come from `find`). List widget is editable.
|
||||||
|
|
||||||
**Network directory**
|
|
||||||
|
|
||||||
Path to directory, which contains network devices information. Default is `/sys/class/net`. Required for auto select network device.
|
|
||||||
|
|
||||||
**Network device**
|
**Network device**
|
||||||
|
|
||||||
Use specified device as active. Combo box items come from **network directory**. Will disable auto select network device.
|
Use specified device as active. Will disable auto select network device.
|
||||||
|
|
||||||
**Battery device**
|
|
||||||
|
|
||||||
File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
|
|
||||||
|
|
||||||
**AC online tag**
|
**AC online tag**
|
||||||
|
|
||||||
@ -162,10 +158,6 @@ Line which will be shown when AC is online.
|
|||||||
|
|
||||||
Line which will be shown when AC is offline.
|
Line which will be shown when AC is offline.
|
||||||
|
|
||||||
**AC device**
|
|
||||||
|
|
||||||
File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
|
|
||||||
|
|
||||||
Tooltip settings
|
Tooltip settings
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
@ -174,9 +166,15 @@ Since version 1.7.0 CPU, CPU clock, memory, swap and network labels support grap
|
|||||||
DataEngine settings
|
DataEngine settings
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
**Custom command**
|
**AC device**
|
||||||
|
|
||||||
*NOTE* This can cause the computer freeze.
|
File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
|
||||||
|
|
||||||
|
**Battery device**
|
||||||
|
|
||||||
|
File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
|
||||||
|
|
||||||
|
**Custom command**
|
||||||
|
|
||||||
Commands, which will be run for custom label.
|
Commands, which will be run for custom label.
|
||||||
|
|
||||||
@ -226,7 +224,7 @@ Select one of supported music playes for player label.
|
|||||||
PTM desktop panel
|
PTM desktop panel
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Since version 1.11.0 PyTextMonitor provides a minimalistic panel for monitoring on desktops written on `C++`. And yes, it looks like the same panel in Awesome.
|
Since version 1.11.0 it provides a minimalistic panel for monitoring on desktops written on `C++`. And yes, it looks like the same panel in Awesome.
|
||||||
|
|
||||||
Desktop panel configuration
|
Desktop panel configuration
|
||||||
---------------------------
|
---------------------------
|
||||||
@ -249,14 +247,14 @@ Type symbol (or string) which will be shown if this desktop is active now.
|
|||||||
|
|
||||||
**Pattern tags**
|
**Pattern tags**
|
||||||
|
|
||||||
* tag `$mark` - show mark if this desktop is active
|
* tag `$mark$` - show mark if this desktop is active
|
||||||
* tag `$name` - name of the current desktop
|
* tag `$name$` - name of the current desktop
|
||||||
* tag `$number` - number of the current desktop
|
* tag `$number$` - number of the current desktop
|
||||||
* tag `$total` - total number of desktops
|
* tag `$total$` - total number of desktops
|
||||||
|
|
||||||
**Command**
|
**Command**
|
||||||
|
|
||||||
Type command which will be run on left click on the selected desktop. Available variables are same as for pattern. Default is `dbus org.kde.kwin /KWin setCurrentDesktop $number`.
|
Type command which will be run on left click on the selected desktop. Available variables are same as for pattern. Default is `dbus org.kde.kwin /KWin setCurrentDesktop $number$`.
|
||||||
|
|
||||||
Instruction
|
Instruction
|
||||||
===========
|
===========
|
||||||
@ -307,7 +305,7 @@ TODO (wish list)
|
|||||||
Links
|
Links
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* [Homepage](http://arcanis.name/projects/pytextmonitor/)
|
* [Homepage](http://arcanis.name/projects/awesome-widgets/)
|
||||||
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Py+Text+Monitor?content=157124)
|
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Py+Text+Monitor?content=157124)
|
||||||
* DataEngine on [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
|
* DataEngine on [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
|
||||||
* Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-pytextmonitor/) package
|
* Archlinux [AUR](https://aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets/) package
|
||||||
|
@ -18,7 +18,7 @@ tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
|
|||||||
rm -rf "${ARCHIVE}"
|
rm -rf "${ARCHIVE}"
|
||||||
|
|
||||||
# build widget
|
# build widget
|
||||||
ARCHIVE="pytextmonitor"
|
ARCHIVE="awesome-widgets"
|
||||||
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING"
|
FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING"
|
||||||
IGNORELIST="build usr"
|
IGNORELIST="build usr"
|
||||||
# create archive
|
# create archive
|
||||||
|
@ -6,8 +6,8 @@ cmake_policy (SET CMP0011 NEW)
|
|||||||
cmake_policy (SET CMP0015 NEW)
|
cmake_policy (SET CMP0015 NEW)
|
||||||
|
|
||||||
project (pytextmonitor)
|
project (pytextmonitor)
|
||||||
set (PROJECT_VERSION_MAJOR 1)
|
set (PROJECT_VERSION_MAJOR 2)
|
||||||
set (PROJECT_VERSION_MINOR 11)
|
set (PROJECT_VERSION_MINOR 0)
|
||||||
set (PROJECT_VERSION_PATCH 0)
|
set (PROJECT_VERSION_PATCH 0)
|
||||||
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||||
set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
|
set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
|
||||||
|
@ -47,7 +47,7 @@ QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
|
|||||||
rawConfig[QString("PKGNULL")] = QString("0");
|
rawConfig[QString("PKGNULL")] = QString("0");
|
||||||
rawConfig[QString("PLAYER")] = QString("mpris");
|
rawConfig[QString("PLAYER")] = QString("mpris");
|
||||||
|
|
||||||
QString fileName = KGlobal::dirs()->findResource("config", "ext-sysmon.conf");
|
QString fileName = KGlobal::dirs()->findResource("config", "extsysmon.conf");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
||||||
QFile configFile(fileName);
|
QFile configFile(fileName);
|
||||||
if (!configFile.open(QIODevice::ReadOnly))
|
if (!configFile.open(QIODevice::ReadOnly))
|
||||||
@ -78,7 +78,7 @@ void AwesomeWidget::writeDataEngineConfiguration(const QMap<QString, QString> se
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
QMap<QString, QString> config = updateDataEngineConfiguration(settings);
|
QMap<QString, QString> config = updateDataEngineConfiguration(settings);
|
||||||
QString fileName = KGlobal::dirs()->locateLocal("config", "ext-sysmon.conf");
|
QString fileName = KGlobal::dirs()->locateLocal("config", "extsysmon.conf");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
|
||||||
QFile configFile(fileName);
|
QFile configFile(fileName);
|
||||||
if (!configFile.open(QIODevice::WriteOnly)) return;
|
if (!configFile.open(QIODevice::WriteOnly)) return;
|
||||||
@ -126,6 +126,7 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
QString cmd, qoutput;
|
QString cmd, qoutput;
|
||||||
QStringList headerList;
|
QStringList headerList;
|
||||||
|
TaskResult process;
|
||||||
|
|
||||||
QWidget *advWidget = new QWidget;
|
QWidget *advWidget = new QWidget;
|
||||||
uiAdvancedConfig.setupUi(advWidget);
|
uiAdvancedConfig.setupUi(advWidget);
|
||||||
@ -165,11 +166,11 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
Qt::MatchFixedString));
|
Qt::MatchFixedString));
|
||||||
cmd = QString("sensors");
|
cmd = QString("sensors");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
||||||
TaskResult sensorsProcess = runTask(cmd);
|
process = runTask(cmd);
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << sensorsProcess.exitCode;
|
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
||||||
if (sensorsProcess.exitCode != 0)
|
if (process.exitCode != 0)
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Error" << sensorsProcess.error;
|
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
|
||||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(sensorsProcess.output);
|
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
|
||||||
uiAdvancedConfig.listWidget_tempDevice->clear();
|
uiAdvancedConfig.listWidget_tempDevice->clear();
|
||||||
for (int i=0; i<qoutput.split(QString("\n\n")).count(); i++) {
|
for (int i=0; i<qoutput.split(QString("\n\n")).count(); i++) {
|
||||||
QString sensor = qoutput.split(QString("\n\n"))[i];
|
QString sensor = qoutput.split(QString("\n\n"))[i];
|
||||||
@ -191,11 +192,11 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
}
|
}
|
||||||
cmd = QString("mount");
|
cmd = QString("mount");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
||||||
TaskResult mountProcess = runTask(cmd);
|
process = runTask(cmd);
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << mountProcess.exitCode;
|
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
||||||
if (mountProcess.exitCode != 0)
|
if (process.exitCode != 0)
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Error" << mountProcess.error;
|
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
|
||||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(mountProcess.output);
|
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
|
||||||
uiAdvancedConfig.listWidget_mount->clear();
|
uiAdvancedConfig.listWidget_mount->clear();
|
||||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
||||||
QString mountPoint = qoutput.split(QChar('\n'))[i].split(QString(" on "))[1].split(QString(" type "))[0];
|
QString mountPoint = qoutput.split(QChar('\n'))[i].split(QString(" on "))[1].split(QString(" type "))[0];
|
||||||
@ -223,11 +224,11 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
}
|
}
|
||||||
cmd = QString("find /dev -name [hms]d[a-z]");
|
cmd = QString("find /dev -name [hms]d[a-z]");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
||||||
TaskResult findProcess = runTask(cmd);
|
process = runTask(cmd);
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << findProcess.exitCode;
|
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
||||||
if (findProcess.exitCode != 0)
|
if (process.exitCode != 0)
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Error" << findProcess.error;
|
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
|
||||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(findProcess.output).trimmed();
|
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||||
uiAdvancedConfig.listWidget_hddDevice->clear();
|
uiAdvancedConfig.listWidget_hddDevice->clear();
|
||||||
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
for (int i=0; i<qoutput.split(QChar('\n')).count(); i++) {
|
||||||
QListWidgetItem *item = new QListWidgetItem(qoutput.split(QChar('\n'))[i]);
|
QListWidgetItem *item = new QListWidgetItem(qoutput.split(QChar('\n'))[i]);
|
||||||
@ -325,11 +326,11 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
uiDEConfig.comboBox_gpudev->findText(deSettings[QString("GPUDEV")], Qt::MatchFixedString));
|
uiDEConfig.comboBox_gpudev->findText(deSettings[QString("GPUDEV")], Qt::MatchFixedString));
|
||||||
cmd = QString("find /dev -name [hms]d[a-z]");
|
cmd = QString("find /dev -name [hms]d[a-z]");
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
|
||||||
TaskResult hddProcess = runTask(cmd);
|
process = runTask(cmd);
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << hddProcess.exitCode;
|
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
||||||
if (hddProcess.exitCode != 0)
|
if (process.exitCode != 0)
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Error" << hddProcess.error;
|
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
|
||||||
qoutput = QTextCodec::codecForMib(106)->toUnicode(hddProcess.output).trimmed();
|
qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
|
||||||
uiDEConfig.comboBox_hdddev->clear();
|
uiDEConfig.comboBox_hdddev->clear();
|
||||||
uiDEConfig.comboBox_hdddev->addItem(QString("all"));
|
uiDEConfig.comboBox_hdddev->addItem(QString("all"));
|
||||||
uiDEConfig.comboBox_hdddev->addItem(QString("disable"));
|
uiDEConfig.comboBox_hdddev->addItem(QString("disable"));
|
||||||
|
@ -167,21 +167,21 @@ QString DesktopPanel::parsePattern(const QString rawLine, const int num)
|
|||||||
mark = configuration[QString("mark")];
|
mark = configuration[QString("mark")];
|
||||||
else
|
else
|
||||||
mark = QString("");
|
mark = QString("");
|
||||||
if (line.split(QString("$mark"))[0] != line) {
|
if (line.split(QString("$mark$"))[0] != line) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found mark";
|
if (debug) qDebug() << PDEBUG << ":" << "Found mark";
|
||||||
line = line.split(QString("$mark"))[0] + mark + line.split(QString("$mark"))[1];
|
line = line.split(QString("$mark$"))[0] + mark + line.split(QString("$mark$"))[1];
|
||||||
}
|
}
|
||||||
if (line.split(QString("$name"))[0] != line) {
|
if (line.split(QString("$name$"))[0] != line) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found name";
|
if (debug) qDebug() << PDEBUG << ":" << "Found name";
|
||||||
line = line.split(QString("$name"))[0] + desktopNames[num] + line.split(QString("$name"))[1];
|
line = line.split(QString("$name$"))[0] + desktopNames[num] + line.split(QString("$name$"))[1];
|
||||||
}
|
}
|
||||||
if (line.split(QString("$number"))[0] != line) {
|
if (line.split(QString("$number$"))[0] != line) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found number";
|
if (debug) qDebug() << PDEBUG << ":" << "Found number";
|
||||||
line = line.split(QString("$number"))[0] + QString::number(num + 1) + line.split(QString("$number"))[1];
|
line = line.split(QString("$number$"))[0] + QString::number(num + 1) + line.split(QString("$number$"))[1];
|
||||||
}
|
}
|
||||||
if (line.split(QString("$total"))[0] != line) {
|
if (line.split(QString("$total$"))[0] != line) {
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found total";
|
if (debug) qDebug() << PDEBUG << ":" << "Found total";
|
||||||
line = line.split(QString("$total"))[0] + QString::number(desktopNames.count()) + line.split(QString("$total"))[1];
|
line = line.split(QString("$total$"))[0] + QString::number(desktopNames.count()) + line.split(QString("$total$"))[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return line;
|
return line;
|
||||||
@ -443,13 +443,13 @@ void DesktopPanel::configChanged()
|
|||||||
KConfigGroup cg = config();
|
KConfigGroup cg = config();
|
||||||
|
|
||||||
configuration[QString("background")] = cg.readEntry("background", "2");
|
configuration[QString("background")] = cg.readEntry("background", "2");
|
||||||
configuration[QString("desktopcmd")] = cg.readEntry("desktopcmd", "qdbus org.kde.kwin /KWin setCurrentDesktop $number");
|
configuration[QString("desktopcmd")] = cg.readEntry("desktopcmd", "qdbus org.kde.kwin /KWin setCurrentDesktop $number$");
|
||||||
configuration[QString("interval")] = cg.readEntry("interval", "1000");
|
configuration[QString("interval")] = cg.readEntry("interval", "1000");
|
||||||
configuration[QString("layout")] = cg.readEntry("layout", "0");
|
configuration[QString("layout")] = cg.readEntry("layout", "0");
|
||||||
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
|
configuration[QString("leftStretch")] = cg.readEntry("leftStretch", "2");
|
||||||
configuration[QString("mark")] = cg.readEntry("mark", "¤");
|
configuration[QString("mark")] = cg.readEntry("mark", "¤");
|
||||||
configuration[QString("panels")] = cg.readEntry("panels", "-1");
|
configuration[QString("panels")] = cg.readEntry("panels", "-1");
|
||||||
configuration[QString("pattern")] = cg.readEntry("pattern", "[$mark$number/$total: $name]");
|
configuration[QString("pattern")] = cg.readEntry("pattern", "[$mark$$number$/$total$: $name$]");
|
||||||
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
|
configuration[QString("rightStretch")] = cg.readEntry("rightStretch", "2");
|
||||||
|
|
||||||
extsysmonEngine->connectSource(QString("desktop"), this, configuration[QString("interval")].toInt());
|
extsysmonEngine->connectSource(QString("desktop"), this, configuration[QString("interval")].toInt());
|
||||||
|
@ -233,10 +233,10 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_pattern">
|
<widget class="QLineEdit" name="lineEdit_pattern">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>$mark - show mark if the current desktop is active
|
<string>$mark$ - show mark if the current desktop is active
|
||||||
$name - desktop name
|
$name$ - desktop name
|
||||||
$number - desktop number
|
$number$ - desktop number
|
||||||
$total - total number of desktops</string>
|
$total$ - total number of desktops</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user