mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-07 19:05:50 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
6cf7792f9a | |||
1df3cf0def | |||
59ffe456de | |||
9b981cb3f0 | |||
f640eb58d7 |
84
CHANGELOG
Normal file
84
CHANGELOG
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
Ver.1.6.1:
|
||||||
|
+ added support of several devices in hddtemp label
|
||||||
|
- fixed #6
|
||||||
|
|
||||||
|
Ver.1.6.0:
|
||||||
|
+ added $custom tag to time and uptime labels (#8)
|
||||||
|
+ russian translation
|
||||||
|
- fixed #6, #10
|
||||||
|
* changed license to GPLv3
|
||||||
|
* changed project build
|
||||||
|
|
||||||
|
Ver.1.5.3:
|
||||||
|
+ added $album, $progress and $time tags to player label (#7)
|
||||||
|
- fixed zero swap
|
||||||
|
|
||||||
|
Ver.1.5.2:
|
||||||
|
+ added $isotime, $shorttime and $longtime tags to time label
|
||||||
|
|
||||||
|
Ver.1.5.1:
|
||||||
|
+ added time label
|
||||||
|
|
||||||
|
Ver.1.5.0:
|
||||||
|
+ added player label
|
||||||
|
|
||||||
|
Ver.1.4.0:
|
||||||
|
+ added notifications
|
||||||
|
|
||||||
|
Ver.1.3.6:
|
||||||
|
- fixed #1, #2
|
||||||
|
|
||||||
|
Ver.1.3.5:
|
||||||
|
- fix bug with definition network device
|
||||||
|
|
||||||
|
Ver.1.3.4:
|
||||||
|
+ added double click event
|
||||||
|
+ added auto selection of network device
|
||||||
|
- fixed yet another plasma crash
|
||||||
|
|
||||||
|
Ver.1.3.3:
|
||||||
|
* edited reading temperature device
|
||||||
|
|
||||||
|
Ver.1.3.2b:
|
||||||
|
- fixed plasma crash
|
||||||
|
|
||||||
|
Ver.1.3.2:
|
||||||
|
+ added GPU, GPU temperature, HDD and HDD temperature labels
|
||||||
|
+ added $ccpu and $ccpucl tags
|
||||||
|
* bug fixes
|
||||||
|
* optimization and refactoring
|
||||||
|
|
||||||
|
Ver.1.2.2:
|
||||||
|
+ added tooltip to lineEdit
|
||||||
|
|
||||||
|
Ver.1.2.1:
|
||||||
|
* if battery doesn't exist return 'off'
|
||||||
|
* if AC doesn't exist return '(?)'
|
||||||
|
|
||||||
|
Ver.1.2.0:
|
||||||
|
+ added $ac tag to battery label
|
||||||
|
+ added battery and ac device configurations
|
||||||
|
+ added error cheking
|
||||||
|
* $bat tag now reading from /sys/*
|
||||||
|
|
||||||
|
Ver.1.1.4:
|
||||||
|
* changed parsing acpi output (battery label)
|
||||||
|
|
||||||
|
Ver.1.1.3:
|
||||||
|
+ added font weight
|
||||||
|
* edited font setup line. Now setup for font family works normaly
|
||||||
|
* small bug fix
|
||||||
|
|
||||||
|
Ver.1.1.2:
|
||||||
|
+ added CPU clock lable
|
||||||
|
+ added function to update network device (100*time_interval)
|
||||||
|
+ changed update sliders
|
||||||
|
|
||||||
|
Ver.1.1.1:
|
||||||
|
+ added $swapmb, $memmb, $netdev, @@netdev=...@@ tags
|
||||||
|
* widget consists of several labels
|
||||||
|
* edited configuration interface
|
||||||
|
- some bug fixes
|
||||||
|
|
||||||
|
Ver.1.0:
|
||||||
|
First release
|
4
PKGBUILD
4
PKGBUILD
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
pkgname=kdeplasma-applets-pytextmonitor
|
pkgname=kdeplasma-applets-pytextmonitor
|
||||||
_pkgname=pytextmonitor
|
_pkgname=pytextmonitor
|
||||||
pkgver=1.6.0
|
pkgver=1.6.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm"
|
pkgdesc="Minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
@ -19,7 +19,7 @@ optdepends=("hddtemp: for HDD temperature monitor"
|
|||||||
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/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
md5sums=('742fcc3c6910d3f80ac74bc0fb224b3d')
|
md5sums=('aa6c5f00b33c073f3732bd921171a557')
|
||||||
backup=('usr/share/config/extsysmon.conf')
|
backup=('usr/share/config/extsysmon.conf')
|
||||||
|
|
||||||
build () {
|
build () {
|
||||||
|
@ -5,6 +5,8 @@ Information
|
|||||||
-----------
|
-----------
|
||||||
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
|
PyTextMonitor is a minimalistic Plasmoid script written on Python2. It looks like widgets in awesome-wm.
|
||||||
|
|
||||||
|
**NOTE** LOOKING FOR TRANSLATORS!
|
||||||
|
|
||||||
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:
|
||||||
@ -46,7 +48,7 @@ For edited output you must open Settings window and setup output format in lines
|
|||||||
* label `$swap` - swap, <i>%</i>
|
* label `$swap` - swap, <i>%</i>
|
||||||
* label `$swapmb` - swap, <i>MB</i>
|
* label `$swapmb` - swap, <i>MB</i>
|
||||||
* label `@@/@@` (in hdd label) - mount point (`/` in example) usage, <i>%</i>. Separator for mount points list is `;`, for example `@@/;/home;/mnt/global@@`
|
* label `@@/@@` (in hdd label) - mount point (`/` in example) usage, <i>%</i>. Separator for mount points list is `;`, for example `@@/;/home;/mnt/global@@`
|
||||||
* label `@@/dev/sda@@` (in hddtemp label) - HDD (`/dev/sda` in example) temperature. `hddtemp` must be installed
|
* label `@@/dev/sda@@` (in hddtemp label) - HDD (`/dev/sda` in example) temperature. Separator for device list is `;`, for example `@@/dev/sda;/dev/sdb@@`. `hddtemp` must be installed
|
||||||
* label `$net` - download and upload speed, <i>KB/s</i>. You may specify network device: something like `@@eth0@@`
|
* label `$net` - download and upload speed, <i>KB/s</i>. You may specify network device: something like `@@eth0@@`
|
||||||
* label `$netdev` - current network device
|
* label `$netdev` - current network device
|
||||||
* label `$bat` - battery charge, <i>%</i>. Battery device may be set below. File (`/sys/class/power_supply/BAT0/capacity` by default) must contain only battery charge in percent
|
* label `$bat` - battery charge, <i>%</i>. Battery device may be set below. File (`/sys/class/power_supply/BAT0/capacity` by default) must contain only battery charge in percent
|
||||||
|
@ -16,7 +16,7 @@ rm -rf "${ARCHIVE}"
|
|||||||
|
|
||||||
# build widget
|
# build widget
|
||||||
ARCHIVE="pytextmonitor"
|
ARCHIVE="pytextmonitor"
|
||||||
FILES="AUTHORS COPYING README.md"
|
FILES="AUTHORS CHANGELOG COPYING README.md"
|
||||||
IGNORELIST="build usr"
|
IGNORELIST="build usr"
|
||||||
# create archive
|
# create archive
|
||||||
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
||||||
|
@ -1,28 +1,24 @@
|
|||||||
func_update()
|
func_update() {
|
||||||
{
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Update plasmoids...
|
Update plasmoids...
|
||||||
EOF
|
EOF
|
||||||
kbuildsycoca4 > /dev/null 2>&1
|
kbuildsycoca4 > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install()
|
post_install() {
|
||||||
{
|
|
||||||
func_update
|
func_update
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Make sure that \`hddtemp\` can be run with sudo without password
|
Make sure that \`hddtemp\` can be run with sudo without password
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade()
|
post_upgrade() {
|
||||||
{
|
|
||||||
func_update
|
func_update
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Make sure that \`hddtemp\` can be run with sudo without password
|
Make sure that \`hddtemp\` can be run with sudo without password
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
post_remove()
|
post_remove() {
|
||||||
{
|
|
||||||
func_update
|
func_update
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ cmake_policy (SET CMP0015 NEW)
|
|||||||
project (pytextmonitor)
|
project (pytextmonitor)
|
||||||
set (PROJECT_VERSION_MAJOR 1)
|
set (PROJECT_VERSION_MAJOR 1)
|
||||||
set (PROJECT_VERSION_MINOR 6)
|
set (PROJECT_VERSION_MINOR 6)
|
||||||
set (PROJECT_VERSION_PATCH 0)
|
set (PROJECT_VERSION_PATCH 1)
|
||||||
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||||
|
|
||||||
message (STATUS "Version: ${PROJECT_VERSION}")
|
message (STATUS "Version: ${PROJECT_VERSION}")
|
||||||
|
@ -249,7 +249,7 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
|||||||
value_album = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
|
value_album = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
|
||||||
else if (qstr.split(QString(" = "), QString::SkipEmptyParts)[0] == QString("ARTIST"))
|
else if (qstr.split(QString(" = "), QString::SkipEmptyParts)[0] == QString("ARTIST"))
|
||||||
value_artist = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
|
value_artist = qstr.split(QString(" = "), QString::SkipEmptyParts)[1].trimmed();
|
||||||
else if (qstr.at(0) == QChar('[')) {
|
else if ((qstr.at(0) == QChar('[')) && (!qstr.contains("[stopped]"))) {
|
||||||
QString time = qstr.split(QString(" "), QString::SkipEmptyParts)[2].trimmed();
|
QString time = qstr.split(QString(" "), QString::SkipEmptyParts)[2].trimmed();
|
||||||
value_progress = QString::number(time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[0].toInt() * 60 +
|
value_progress = QString::number(time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[0].toInt() * 60 +
|
||||||
time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[1].toInt());
|
time.split(QString("/"), QString::SkipEmptyParts)[0].split(QString(":"), QString::SkipEmptyParts)[1].toInt());
|
||||||
@ -318,7 +318,7 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
|||||||
value_progress = QString("0");
|
value_progress = QString("0");
|
||||||
value_duration = QString("0");
|
value_duration = QString("0");
|
||||||
char commandStr[512];
|
char commandStr[512];
|
||||||
sprintf (commandStr, "echo 'currentsong\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%s:%s 2> /dev/null", \
|
sprintf(commandStr, "bash -c \"echo 'currentsong\nstatus\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%s:%s 2> /dev/null\"", \
|
||||||
mpdAddress.toUtf8().data(), mpdPort.toUtf8().data());
|
mpdAddress.toUtf8().data(), mpdPort.toUtf8().data());
|
||||||
qoutput = QString("");
|
qoutput = QString("");
|
||||||
player.start(QString(commandStr));
|
player.start(QString(commandStr));
|
||||||
@ -331,8 +331,10 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
|||||||
value_album = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
value_album = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
||||||
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Artist"))
|
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Artist"))
|
||||||
value_artist = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
value_artist = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
||||||
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Time"))
|
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("time")) {
|
||||||
value_duration = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
value_duration = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[0];
|
||||||
|
value_progress = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed().split(QString(":"))[1];
|
||||||
|
}
|
||||||
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Title"))
|
else if (qstr.split(QString(": "), QString::SkipEmptyParts)[0] == QString("Title"))
|
||||||
value = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
value = qstr.split(QString(": "), QString::SkipEmptyParts)[1].trimmed();
|
||||||
}
|
}
|
||||||
|
@ -260,10 +260,13 @@ class DataEngine:
|
|||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_gputemp.setText(text)
|
self.parent.label_gputemp.setText(text)
|
||||||
elif (sourceName == "hddtemp"):
|
elif (sourceName == "hddtemp"):
|
||||||
value = str(data[QString(self.parent.hddtempFormat.split('@@')[1])])
|
hddtempText = []
|
||||||
hddtempText = "%4s" % (value)
|
for device in self.parent.hddtempFormat.split('@@')[1].split(';'):
|
||||||
|
if (len(device) > 0):
|
||||||
|
value = str(data[QString(device)])
|
||||||
|
hddtempText.append("%4s" % (value))
|
||||||
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
||||||
line = self.parent.hddtempFormat.split('@@')[0] + hddtempText + self.parent.hddtempFormat.split('@@')[2]
|
line = self.parent.hddtempFormat.split('@@')[0] + ' '.join(hddtempText) + self.parent.hddtempFormat.split('@@')[2]
|
||||||
else:
|
else:
|
||||||
line = self.parent.hddtempFormat
|
line = self.parent.hddtempFormat
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
|
Reference in New Issue
Block a user