mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-01-21 09:26:48 +00:00
[kitty] Update hints to copy the values instead of inserting them
This commit is contained in:
parent
43abb65b09
commit
c23f469e05
@ -85,6 +85,8 @@ listen_on unix:@mykitty
|
|||||||
|
|
||||||
map F1 launch --allow-remote-control kitty +kitten broadcast
|
map F1 launch --allow-remote-control kitty +kitten broadcast
|
||||||
map ctrl+alt+p kitten secrets.py "description" "Kitty password"
|
map ctrl+alt+p kitten secrets.py "description" "Kitty password"
|
||||||
|
map kitty_mod+p>f kitten hints --type path --program @
|
||||||
map kitty_mod+p>l kitten hints --type line --program @
|
map kitty_mod+p>l kitten hints --type line --program @
|
||||||
|
map kitty_mod+p>w kitten hints --type word --program @
|
||||||
|
|
||||||
#: }}}
|
#: }}}
|
||||||
|
@ -19,7 +19,7 @@ from kitty.boss import Boss
|
|||||||
|
|
||||||
def main(args: List[str]) -> Optional[str]:
|
def main(args: List[str]) -> Optional[str]:
|
||||||
secrets = get_secret_names(args[1], args[2])
|
secrets = get_secret_names(args[1], args[2])
|
||||||
entries = WordCompleter(secrets)
|
entries = WordCompleter(list(secrets.keys()))
|
||||||
session = PromptSession(completer=entries)
|
session = PromptSession(completer=entries)
|
||||||
try:
|
try:
|
||||||
entry = session.prompt('> ', pre_run=expand_prompt)
|
entry = session.prompt('> ', pre_run=expand_prompt)
|
||||||
@ -54,7 +54,7 @@ def get_secret_names(attribute: str, value: str) -> Dict[str, str]:
|
|||||||
return secrets
|
return secrets
|
||||||
|
|
||||||
|
|
||||||
def handle_result(args: List[str], answer: str, target_window_id: int, boss: Boss) -> None:
|
def handle_result(_: List[str], answer: str, target_window_id: int, boss: Boss) -> None:
|
||||||
window = boss.window_id_map.get(target_window_id)
|
window = boss.window_id_map.get(target_window_id)
|
||||||
if window is not None:
|
if window is not None:
|
||||||
window.paste(answer)
|
window.paste(answer)
|
||||||
|
Loading…
Reference in New Issue
Block a user