fixed custom qtile widgets
This commit is contained in:
@@ -5,7 +5,7 @@ import re
|
|||||||
from libqtile import widget, bar
|
from libqtile import widget, bar
|
||||||
|
|
||||||
#region Custom_Memory
|
#region Custom_Memory
|
||||||
class MemoryC(widget.base.ThreadedPollText):
|
class MemoryC(widget.base.ThreadPoolText):
|
||||||
orientations = widget.base.ORIENTATION_HORIZONTAL
|
orientations = widget.base.ORIENTATION_HORIZONTAL
|
||||||
defaults = [
|
defaults = [
|
||||||
("format", "{MemUsed}GB/{MemTotal}GB", "Formatting for field names."),
|
("format", "{MemUsed}GB/{MemTotal}GB", "Formatting for field names."),
|
||||||
@@ -13,13 +13,9 @@ class MemoryC(widget.base.ThreadedPollText):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, **config):
|
def __init__(self, **config):
|
||||||
super().__init__(**config)
|
super().__init__("",**config)
|
||||||
self.add_defaults(MemoryC.defaults)
|
self.add_defaults(MemoryC.defaults)
|
||||||
|
|
||||||
def tick(self):
|
|
||||||
self.update(self.poll())
|
|
||||||
return self.update_interval
|
|
||||||
|
|
||||||
def poll(self):
|
def poll(self):
|
||||||
mem = psutil.virtual_memory()
|
mem = psutil.virtual_memory()
|
||||||
swap = psutil.swap_memory()
|
swap = psutil.swap_memory()
|
||||||
|
|||||||
Reference in New Issue
Block a user