From 64568de8513d74cc879501200950e80f1a942d9f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 16 Dec 2013 22:07:22 +0100 Subject: [PATCH] Add commands.py --- qutebrowser/commands.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 qutebrowser/commands.py diff --git a/qutebrowser/commands.py b/qutebrowser/commands.py new file mode 100644 index 000000000..132602f81 --- /dev/null +++ b/qutebrowser/commands.py @@ -0,0 +1,12 @@ +from PyQt5.QtCore import QObject, pyqtSignal + +class CommandParser(QObject): + openurl = pyqtSignal(str) + tabopen = pyqtSignal(str) + + def parse(self, cmd): + c = cmd.split() + if c[0] == ':open': + self.openurl.emit(c[1]) + elif c[0] == ':tabopen': + self.tabopen.emit(c[1])