Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitty @ focus-tab --match index:2 #3708

Closed
daniel-pfeiffer opened this issue Jun 10, 2021 · 1 comment
Closed

kitty @ focus-tab --match index:2 #3708

daniel-pfeiffer opened this issue Jun 10, 2021 · 1 comment

Comments

@daniel-pfeiffer
Copy link

daniel-pfeiffer commented Jun 10, 2021

Since the only information documented as addable to a tab-title is the index, the above syntax would be very handy!

So, may I suggest adding/adapting these lines to boss.match_tabs? Untested, and not sure about the 2nd line, the like of which I searched for on StackOverflow. Apparently something intuitive like self.all_tabs[exp - 1] would have made people's lives too easy. This would also need error handling, if exp is out of range:

        elif field == 'index':
            next((tab for i, tab in enumerate(self.all_tabs) if i + 1 == exp), None)
            if tab:
                yield tab
                found = True

Btw: Trying to build, I got harfbuzzed :-o and replacing boss.pyc by a modified boss.py has no effect. Actually the whole .local/kitty.app/lib/python3.9/kitty directory seems superfluous (removed it and kitty still works.) Not sure what magic that is.

@kovidgoyal
Copy link
Owner

kitty loads its python code from a single mmapped file as optimized
bytecode for performance. So you cant monkeypatch it easily. If you
want to you can modify the python only parts of kitty, as described
here: https://github.com/kovidgoyal/kitty/blob/master/docs/build.rst
in the note near the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants