mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
fixes
This commit is contained in:
parent
2ddf9082f2
commit
e6bbea9c07
BIN
screenshots/ptm_config.png
Normal file
BIN
screenshots/ptm_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 KiB |
@ -23,7 +23,8 @@ from PyKDE4 import plasmascript
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
timeLetters = ['dddd', 'ddd', 'dd', 'd', 'MMMM', 'MMM', 'MM', 'M', 'yyyy', 'yy', \
|
timeLetters = ['dddd', 'ddd', 'dd', 'd', \
|
||||||
|
'MMMM', 'MMM', 'MM', 'M', 'yyyy', 'yy', \
|
||||||
'hh', 'h', 'mm', 'm', 'ss', 's']
|
'hh', 'h', 'mm', 'm', 'ss', 's']
|
||||||
|
|
||||||
|
|
||||||
@ -102,11 +103,11 @@ class DataEngine:
|
|||||||
elif (line.split('$custom')[0] != line):
|
elif (line.split('$custom')[0] != line):
|
||||||
line = ''.join(line.split('$custom'))
|
line = ''.join(line.split('$custom'))
|
||||||
if (line.split('$ds')[0] != line):
|
if (line.split('$ds')[0] != line):
|
||||||
line = line.split('$ds')[0] + str(days) + line.split('$ds')[1]
|
line = "%s%3i%s" % (line.split('$ds')[0], days, line.split('$ds')[1])
|
||||||
if (line.split('$hs')[0] != line):
|
if (line.split('$hs')[0] != line):
|
||||||
line = line.split('$hs')[0] + str(hours) + line.split('$hs')[1]
|
line = "%s%2i%s" % (line.split('$hs')[0], hours, line.split('$hs')[1])
|
||||||
if (line.split('$ms')[0] != line):
|
if (line.split('$ms')[0] != line):
|
||||||
line = line.split('$ms')[0] + str(minutes) + line.split('$ms')[1]
|
line = "%s%2i%s" % (line.split('$ms')[0], minutes, line.split('$ms')[1])
|
||||||
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_uptime.setText(text)
|
self.parent.label_uptime.setText(text)
|
||||||
elif (sourceName == "cpu/system/TotalLoad"):
|
elif (sourceName == "cpu/system/TotalLoad"):
|
||||||
|
@ -72,7 +72,7 @@ $custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\o zero;
|
|||||||
$yyyy - year; $yy short year;
|
$yyyy - year; $yy short year;
|
||||||
$hh - hours (24 only); $h - hours w\o zero (24 only);
|
$hh - hours (24 only); $h - hours w\o zero (24 only);
|
||||||
$mm - minutes; $m - minutes w\o zero;
|
$mm - minutes; $m - minutes w\o zero;
|
||||||
s$ss - seconds; $s - seconds w\o zero</string>
|
$ss - seconds; $s - seconds w\o zero</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
Loading…
Reference in New Issue
Block a user