From 8a604e4f24ebfe053b3b65483b998e2a57d51557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Soykan=20Ert=C3=BCrk?= Date: Thu, 16 Apr 2020 22:29:18 +0300 Subject: [PATCH 1/3] left mouse click to open todo list --- bumblebee/modules/todo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bumblebee/modules/todo.py b/bumblebee/modules/todo.py index 04cd256..b26d7c7 100644 --- a/bumblebee/modules/todo.py +++ b/bumblebee/modules/todo.py @@ -21,11 +21,12 @@ class Module(bumblebee.engine.Module): ) self._doc = os.path.expanduser(self.parameter("file", "~/Documents/todo.txt")) self._todos = self.count_items() + engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, cmd="xdg-open {0}".format(self._doc)) def output(self, widget): - self._todos = self.count_items() - return str(self._todos) + self._todos = self.count_items() + return str(self._todos) def state(self, widgets): From cc8adc65163b4c33bbc5b1d8c78b38f6b9fb948b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Soykan=20Ert=C3=BCrk?= Date: Thu, 16 Apr 2020 22:35:20 +0300 Subject: [PATCH 2/3] new requirements of todo module --- Modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules.md b/Modules.md index 3b9f595..4763dff 100644 --- a/Modules.md +++ b/Modules.md @@ -66,7 +66,7 @@ |taskwarrior |Displays the number of pending tasks in TaskWarrior.

Requires the following library:
* taskw

Parameters:
* taskwarrior.taskrc : path to the taskrc file (defaults to ~/.taskrc)
| |test |Test module
| |title |Displays focused i3 window title.

Requirements:
* i3ipc

Parameters:
* title.max : Maximum character length for title before truncating. Defaults to 64.
* title.placeholder : Placeholder text to be placed if title was truncated. Defaults to "...".
* title.scroll : Boolean flag for scrolling title. Defaults to False
| -|todo |Displays the number of todo items from a text file

Parameters:
* todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt)
| +|todo |Displays the number of todo items from a text file

Requirements:
* xdg-open

Parameters:
* todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt)
| |traffic |Displays network IO for interfaces.

Parameters:
* traffic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth")
* traffic.states: Comma-separated list of states to show (prefix with "^" to invert - i.e. ^down -\> show all devices that are not in state down)
* traffic.showname: If set to False, hide network interface name (defaults to True)
* traffic.format: Format string for download/upload speeds.
Defaults to "{:.2f}"
* traffic.graphlen: Graph lenth in seconds. Positive even integer. Each
char shows 2 seconds. If set, enables up/down traffic
graphs
| |twmn |Toggle twmn notifications. | |uptime |Displays the system uptime. | From 8df4807e28c164bdcce5d122c1f9e140eecd1e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Soykan=20Ert=C3=BCrk?= Date: Thu, 16 Apr 2020 23:11:25 +0300 Subject: [PATCH 3/3] requirement --- bumblebee/modules/todo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee/modules/todo.py b/bumblebee/modules/todo.py index b26d7c7..8a524cd 100644 --- a/bumblebee/modules/todo.py +++ b/bumblebee/modules/todo.py @@ -2,6 +2,9 @@ """Displays the number of todo items from a text file +Requires the following executable: + * xdg-open + Parameters: * todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt) """