Add commands.py
This commit is contained in:
parent
ea31eb35c8
commit
64568de851
12
qutebrowser/commands.py
Normal file
12
qutebrowser/commands.py
Normal file
@ -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])
|
Loading…
Reference in New Issue
Block a user