mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 04:13:44 +00:00
Add skeleton for choose kitten
This commit is contained in:
parent
19bce0c23c
commit
edb25314c5
1 changed files with 38 additions and 0 deletions
38
kittens/choose/main.py
Normal file
38
kittens/choose/main.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env python
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
from ..tui.handler import Handler
|
||||
from ..tui.loop import Loop
|
||||
|
||||
|
||||
class ChooseHandler(Handler):
|
||||
|
||||
def initialize(self):
|
||||
pass
|
||||
|
||||
def on_text(self, text, in_bracketed_paste=False):
|
||||
pass
|
||||
|
||||
def on_key(self, key_event):
|
||||
pass
|
||||
|
||||
def on_interrupt(self):
|
||||
self.quit_loop(1)
|
||||
|
||||
def on_eot(self):
|
||||
self.quit_loop(1)
|
||||
|
||||
|
||||
def main(args):
|
||||
loop = Loop()
|
||||
handler = ChooseHandler()
|
||||
loop.loop(handler)
|
||||
raise SystemExit(loop.return_code)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
Loading…
Add table
Add a link
Reference in a new issue