From 40d767ae6e87ebe393f5cadf9691ab23e65f6fc3 Mon Sep 17 00:00:00 2001 From: brunosmmm Date: Thu, 1 Jun 2017 12:27:39 -0400 Subject: [PATCH] added an option to select which file manager to open --- bumblebee/modules/disk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bumblebee/modules/disk.py b/bumblebee/modules/disk.py index 246c068..0ed4895 100644 --- a/bumblebee/modules/disk.py +++ b/bumblebee/modules/disk.py @@ -6,6 +6,7 @@ Parameters: * disk.warning: Warning threshold in % of disk space (defaults to 80%) * disk.critical: Critical threshold in % of disk space (defaults ot 90%) * disk.path: Path to calculate disk usage from (defaults to /) + * disk.open: Which application / file manager to launch (default xdg-open) * disk.showUsed: Show used space (defaults to yes) * disk.showSize: Show total size (defaults to yes) * disk.showPercent: Show usage percentage (defaults to yes) @@ -26,12 +27,14 @@ class Module(bumblebee.engine.Module): self._sused = self.parameter("showUsed", "yes") self._ssize = self.parameter("showSize", "yes") self._spercent = self.parameter("showPercent", "yes") + self._app = self.parameter("open", "xdg-open") self._perc = 0 self._used = 0 self._size = 0 engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, - cmd="nautilus {}".format(self._path)) + cmd="{} {}".format(self._app, + self._path)) def diskspace(self, widget): if self._sused == "yes":