Skip to content

Instantly share code, notes, and snippets.

@cvpe
cvpe / Double_keyboard.py
Created April 12, 2020 15:32
Double_keyboard.py
# todo
# - right aligned keys?
import ui
from objc_util import *
import ui
from objc_util import *
def SetTextFieldPad(tf, pad=None, clearButtonMode=False, undo_redo_pasteBarButtons=True, textfield_did_change=None):
if not pad:
@cvpe
cvpe / find_in_files_new_menu.py
Created April 12, 2020 15:00
find_in_files_new_menu.py
import customMenuItem
from objc_util import *
import os
import threading
import ui
class my_thread(threading.Thread):
global main_view
def __init__(self,view,search_term):
threading.Thread.__init__(self)
@cvpe
cvpe / customMenuItem.py
Created April 15, 2020 11:47
customMenuItem.py
# from https://gist.github.com/jsbain/9edea18951d296ca46aca8868791e04e
# small modifications of @jonB script to:
# - pass to MenuNotificationObserver class, new menu items as
# either one item, as originally
# either as a tuple with 2nd element as title of an existing option
# where to insert before
# - no insert if existing option does not exist to avoid unuseless option
# - 15apr2020: if the searched text did contain long unicode characters,
# text range was erroneous, use anoter way adviced by @jonB