[modules/ping] Re-enable ping module
Show RTT measured by ICMP echo request/replies for a given host. For that to work correctly, change the "full_text" callback for a widget so that the widget itself is also passed as argument in the callback method. That actually makes a lot of sense, since the widget can now be used as a repository of state information. see #23
This commit is contained in:
parent
4f6ec89d3c
commit
71582cbcd7
15 changed files with 98 additions and 21 deletions
|
@ -21,11 +21,13 @@ class Module(bumblebee.engine.Module):
|
|||
)
|
||||
self._path = self.parameter("path", "/")
|
||||
self._perc = 0
|
||||
self._used = 0
|
||||
self._size = 0
|
||||
|
||||
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
|
||||
cmd="nautilus {}".format(self._path))
|
||||
|
||||
def diskspace(self):
|
||||
def diskspace(self, widget):
|
||||
return "{} {}/{} ({:05.02f}%)".format(self._path,
|
||||
bumblebee.util.bytefmt(self._used),
|
||||
bumblebee.util.bytefmt(self._size), self._perc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue