mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
feat(kitty): add search functionality from https://github.com/trygveaa/kitty-kitten-search
This commit is contained in:
18
home/.config/kitty/scroll_mark.py
Normal file
18
home/.config/kitty/scroll_mark.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from kittens.tui.handler import result_handler
|
||||
from kitty.boss import Boss
|
||||
|
||||
|
||||
def main(args: list[str]) -> None:
|
||||
pass
|
||||
|
||||
|
||||
@result_handler(no_ui=True)
|
||||
def handle_result(
|
||||
args: list[str], answer: str, target_window_id: int, boss: Boss
|
||||
) -> None:
|
||||
w = boss.window_id_map.get(target_window_id)
|
||||
if w is not None:
|
||||
if len(args) > 1 and args[1] != "prev":
|
||||
w.scroll_to_mark(prev=False)
|
||||
else:
|
||||
w.scroll_to_mark()
|
Reference in New Issue
Block a user