mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-23 10:39:56 +00:00
added create_diff
+added tags $*tot*
This commit is contained in:
@ -485,6 +485,12 @@ class pyTextWidget(plasmascript.Applet):
|
||||
def memText(self):
|
||||
"""function to set mem text"""
|
||||
line = self.ptm['vars']['formats']['mem']
|
||||
if (line.split('$memtotgb')[0] != line):
|
||||
mem = "%4.1f" %((self.ptm['values']['mem']['free'] + self.ptm['values']['mem']['used']) / (1024.0 * 1024.0))
|
||||
line = line.split('$memtotgb')[0] + mem + line.split('$memtotgb')[1]
|
||||
if (line.split('$memtotmb')[0] != line):
|
||||
mem = "%i" %((self.ptm['values']['mem']['free'] + self.ptm['values']['mem']['used']) / 1024.0)
|
||||
line = line.split('$memtotmb')[0] + mem + line.split('$memtotmb')[1]
|
||||
if (line.split('$memgb')[0] != line):
|
||||
mem = "%4.1f" % (self.ptm['values']['mem']['app'] / (1024.0 * 1024.0))
|
||||
line = line.split('$memgb')[0] + mem + line.split('$memgb')[1]
|
||||
@ -520,6 +526,12 @@ class pyTextWidget(plasmascript.Applet):
|
||||
def swapText(self):
|
||||
"""function to set swap text"""
|
||||
line = self.ptm['vars']['formats']['swap']
|
||||
if (line.split('$swaptotgb')[0] != line):
|
||||
mem = "%4.1f" % ((self.ptm['values']['swap']['free'] + self.ptm['values']['swap']['used']) / (1024.0 * 1024.0))
|
||||
line = line.split('$swaptotgb')[0] + mem + line.split('$swaptotgb')[1]
|
||||
if (line.split('$swaptotmb')[0] != line):
|
||||
mem = "%i" % ((self.ptm['values']['swap']['free'] + self.ptm['values']['swap']['used']) / 1024.0)
|
||||
line = line.split('$swaptotmb')[0] + mem + line.split('$swaptotmb')[1]
|
||||
if (line.split('$swapgb')[0] != line):
|
||||
mem = "%4.1f" % (self.ptm['values']['swap']['used'] / (1024.0 * 1024.0))
|
||||
line = line.split('$swapgb')[0] + mem + line.split('$swapgb')[1]
|
||||
|
@ -520,7 +520,9 @@ $cpuclN - CPU clock for core N, MHz</string>
|
||||
<property name="toolTip">
|
||||
<string>$mem - RAM usage, %
|
||||
$memmb - RAM usage, MB
|
||||
$memgb - RAM usage, GB</string>
|
||||
$memgb - RAM usage, GB
|
||||
$memtotmb - total RAM, MB
|
||||
$memtotgb - total RAM, GB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@ -583,7 +585,9 @@ $memgb - RAM usage, GB</string>
|
||||
<property name="toolTip">
|
||||
<string>$swap - swap usage, %
|
||||
$swapmb - swap usage, MB
|
||||
$swapgb - swap usage, GB</string>
|
||||
$swapgb - swap usage, GB
|
||||
$swaptotmb - total swap, MB
|
||||
$swaptotgb - total swap, GB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@ -2481,8 +2485,8 @@ del - remove item</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>544</width>
|
||||
<height>540</height>
|
||||
<width>326</width>
|
||||
<height>414</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
|
Reference in New Issue
Block a user