예제 #1
0
파일: utils.py 프로젝트: dandycheung/kitty
def detach_tab_parse(func: str, rest: str) -> FuncArgsType:
    if rest not in ('new', 'ask'):
        log_error(f'Ignoring invalid detach_tab argument: {rest}')
        rest = 'new'
    return func, (rest,)
예제 #2
0
 def abort() -> None:
     log_error(f'Symbol map: {val} is invalid, ignoring')
예제 #3
0
파일: utils.py 프로젝트: dandycheung/kitty
 def abort(msg: str) -> None:
     log_error('Send text: {} is invalid ({}), ignoring'.format(
         val, msg))
예제 #4
0
def set_colors(func: str, rest: str) -> FuncArgsType:
    import shlex
    r = shlex.split(rest)
    if len(r) < 1:
        log_error('Too few arguments to set_colors function')
    return func, r
예제 #5
0
def remote_control(func: str, rest: str) -> FuncArgsType:
    func, args = shlex_parse(func, rest)
    if len(args) < 1:
        log_error('Too few arguments to remote_control function')
    return func, args
예제 #6
0
def detach_window_parse(func: str, rest: str) -> FuncArgsType:
    if rest not in ('new', 'new-tab', 'ask', 'tab-prev', 'tab-left',
                    'tab-right'):
        log_error(f'Ignoring invalid detach_window argument: {rest}')
        rest = 'new'
    return func, (rest, )
예제 #7
0
 def abort(msg: str) -> None:
     log_error(f'Send text: {val} is invalid ({msg}), ignoring')
예제 #8
0
 def abort() -> Dict[Tuple[int, int], str]:
     log_error(f'Symbol map: {val} is invalid, ignoring')
예제 #9
0
def remote_control(func: str, rest: str) -> FuncArgsType:
    import shlex
    r = shlex.split(rest)
    if len(r) < 1:
        log_error('Too few arguments to remote_control function')
    return func, r
예제 #10
0
def detach_window_parse(func: str, rest: str) -> FuncArgsType:
    if rest not in ('new', 'new-tab', 'ask'):
        log_error('Ignoring invalid detach_window argument: {}'.format(rest))
        rest = 'new'
    return func, (rest, )
예제 #11
0
파일: render.py 프로젝트: agriffis/kitty
 def dl(f: UnderlineCallback, *a: Any) -> None:
     try:
         f(ans, cell_width, *a)
     except Exception as e:
         log_error(f'Failed to render {f.__name__} at cell_width={cell_width} and cell_height={cell_height} with error: {e}')
예제 #12
0
파일: render.py 프로젝트: z49x2vmq/kitty
 def dl(f: UnderlineCallback, *a: Any) -> None:
     try:
         f(ans, cell_width, *a)
     except Exception as e:
         log_error('Failed to render {} at cell_width={} and cell_height={} with error: {}'.format(
             f.__name__, cell_width, cell_height, e))