Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Talon 0.0.5.4 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lunixbochs committed Feb 17, 2018
1 parent b496576 commit 8d41a21
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 20 deletions.
2 changes: 0 additions & 2 deletions autosleep.py
Expand Up @@ -6,5 +6,3 @@ def on_status(topic, j):
engine.mimic('go to sleep')

engine.register('status', on_status)

def unload(): engine.unregister('status', on_status)
2 changes: 0 additions & 2 deletions crawl.py
Expand Up @@ -218,5 +218,3 @@ def stopstep(j):
'''

ctx.keymap(keymap)

def unload(): ctx.unload()
2 changes: 0 additions & 2 deletions eye_control.py
Expand Up @@ -8,5 +8,3 @@
'camera overlay': lambda m: eye.on_menu('Eye Tracking >> Show Camera Overlay'),
'run calibration': lambda m: eye.on_menu('Eye Tracking >> Calibrate'),
})

def unload(): ctx.unload()
8 changes: 1 addition & 7 deletions mouse.py
Expand Up @@ -8,7 +8,7 @@
mouse_history = [(x, y, time.time())]
force_move = None

def on_move(_, e):
def on_move(typ, e):
mouse_history.append((e.x, e.y, time.time()))
if force_move:
e.x, e.y = force_move
Expand Down Expand Up @@ -58,9 +58,3 @@ def mouse_release(m):
'release': mouse_release,
}
ctx.keymap(keymap)

def unload():
global mouse_history
ctx.unload()
tap.unregister(tap.MMOVE, on_move)
mouse_history = []
8 changes: 3 additions & 5 deletions switcher.py
Expand Up @@ -22,6 +22,8 @@ def update_lists():
global apps
new = {}
for app in ui.apps():
if not app.windows():
continue
words = app.name.split(' ')
for word in words:
if word and not word in new:
Expand All @@ -33,12 +35,8 @@ def update_lists():
apps = new

def ui_event(event, arg):
if event in ('app_activate', 'app_deactivate', 'app_launch', 'app_close'):
if event in ('app_activate', 'app_launch', 'app_close', 'win_open', 'win_close'):
update_lists()

ui.register('', ui_event)
update_lists()

def unload():
ctx.unload()
ui.unregister('', update_lists)
2 changes: 0 additions & 2 deletions vim.py
Expand Up @@ -27,5 +27,3 @@
'word write': 'write',
'word linux': 'linux',
})

def unload(): ctx.unload()

0 comments on commit 8d41a21

Please sign in to comment.