from talon import Context, Module, actions mod = Module() mod.list("windows_dlls", desc="A list of shortcut names for windows DLLs") ctx = Context() ctx.matches = r""" mode: user.windbg """ ctx.lists["self.windows_dlls"] = { "core": "ntdll", "en tea": "ntdll", "user": "******", } @mod.capture(rule="{self.windows_dlls}") def windows_dlls(m) -> str: "Return an register" return m.windows_dlls @ctx.action_class("user") class user_actions: def debugger_clear_breakpoint_id(number_small: int): actions.insert(f"bc {number_small}\n") def debugger_disable_breakpoint_id(number_small: int): actions.insert(f"bd {number_small}\n")
import logging from typing import Dict, Sequence from talon import Context, Module, actions from .user_settings import get_list_from_csv mod = Module() ctx = Context() mod.list("vocabulary", desc="additional vocabulary words") # Default words that will need to be capitalized (particularly under w2l). # NB. These defaults and those later in this file are ONLY used when # auto-creating the corresponding settings/*.csv files. Those csv files # determine the contents of user.vocabulary and dictate.word_map. Once they # exist, the contents of the lists/dictionaries below are irrelevant. _capitalize_defaults = [ "I", "I'm", "I've", "I'll", "I'd", "Monday", "Mondays", "Tuesday", "Tuesdays", "Wednesday", "Wednesdays", "Thursday", "Thursdays", "Friday",
# a list of homophones where each line is a comma separated list # e.g. where,wear,ware # a suitable one can be found here: # https://github.com/pimentel/homophones cwd = os.path.dirname(os.path.realpath(__file__)) homophones_file = os.path.join(cwd, "homophones.csv") # if quick_replace, then when a word is selected and only one homophone exists, # replace it without bringing up the options quick_replace = True show_help = False ######################################################################## ctx = Context() mod = Module() mod.mode("homophones") mod.list("homophones_canonicals", desc="list of words ") main_screen = ui.main_screen() def update_homophones(name, flags): if name != homophones_file: return phones = {} canonical_list = [] with open(homophones_file, "r") as f: for line in f: words = line.rstrip().split(",") canonical_list.append(max(words, key=len)) for word in words:
# XXX - this should have os awarenss from talon import Context, Module, actions mod = Module() mod.list("paths_public", desc="Common paths") mod.list("paths_private", desc="Common private paths") mod.list("folder_paths_public", desc="Common paths") mod.list("folder_paths_private", desc="Common private paths") ctx = Context() # paths that will work with pivot command linux_folder_paths = { "user services": "~/.config/systemd/user/", "services": "/etc/systemd/system/", "sessions": "~/.vim/sessions/", "plugins": "~/.vim/plugged/", "temp": "/tmp/", "config": "/etc/", "it see": "/etc/", "grub": "/etc/default/grub", "boot config": "/boot/grub/grub.cfg", "user": "******", "user bin": "/usr/bin/", "user lib": "/usr/lib/", "user local": "/usr/local/", "user local bin": "/usr/local/bin", "user local lib": "/usr/local/lib", "log": "/var/log/", "shell config": "~/.ohmyzsh/", "shell functions": "~/.ohmyzsh/custom/functions/", "dot files": "~/dotfiles/",