mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
New release 1.1.4
widget: * changed parsing acpi output
This commit is contained in:
parent
005c5cba54
commit
9ccf1b597a
Binary file not shown.
@ -465,7 +465,7 @@ class pyTextWidget(plasmascript.Applet):
|
||||
def batText(self):
|
||||
"""function to set battery text"""
|
||||
commandOut = commands.getoutput("acpi")
|
||||
bat = "%3s" % (commandOut.split()[3].split("%")[0])
|
||||
bat = "%3s" % (commandOut.split(':')[1].split()[1].split('%')[0])
|
||||
line = self.batFormat.split('$bat')[0] + bat + self.batFormat.split('$bat')[1]
|
||||
text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1]
|
||||
self.label_bat.setText(text)
|
||||
|
@ -9,7 +9,7 @@ X-Plasma-MainScript=code/main.py
|
||||
X-KDE-PluginInfo-Author=Evgeniy Alexeev aka arcanis
|
||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||
X-KDE-PluginInfo-Name=py-text-monitor
|
||||
X-KDE-PluginInfo-Version=1.1.3
|
||||
X-KDE-PluginInfo-Version=1.1.4
|
||||
X-KDE-PluginInfo-Website=http://kde-look.org/
|
||||
X-KDE-PluginInfo-Category=System Information
|
||||
X-KDE-PluginInfo-Depends=
|
||||
|
Loading…
Reference in New Issue
Block a user