• This repository has been archived on 28/May/2022
  • Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Python
  • License
    BSD Zero Clause L...
  • Created about 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a single source of application-specific scripts

CircleCI

talon_community

A single source of application-specific scripts

Clone a fork of this repository in a directory inside of your user directory, such as community.

Installation

If you wish to develop on these scripts, run in the project root:

python3 setup.py install

To install linters and formatter

General Guidelines

  • The apps/ folder is "single script per app, named by the app", nothing goes in the apps folder unless it's a script supporting exactly one app with a context properly scoped to the app (unscoped scripts are fine for now for apps like spectacle, though probably note down the app's bundle identifier in the script so we can detect if it's running later)
  • Context-specific languages (programming, spoken languages, specific config file syntax, that sort of thing) goes in lang/, generic text insertion goes in text/, anything else goes in misc/
  • Try to not duplicate existing commands/functionality. There should only be one way to do something and typically only one way to say something (symbols/operators are a notable exception).
  • If you're renaming/refactoring: the "one command" for an action should also be named to be clear about what it's doing, and err on the side of slightly verbose, ideally prefixed with a mental context. This is because it's easier for users to bolt shortcuts onto an expressive grammar than learn a non-composable compact grammar like voicecode. An example of this is tab close is more expressive than totch and is prefixed with the tab scope. voicecode's grammar can be bolted on later / as a separate set of scripts. "voicecode compatibility" is something of an opposite goal to coming up with a consistent grammar.
  • use relative imports
  • spaces for indentation
  • follow ctx = Context(), ctx.keymap({}) instead of using a separate dict unless you have a good reason

Context activation

When adding new commands, try to scope their context as narrowly as possible.

The implementation of a flexible way to determine context activtion is a work in progress. For the time being:

  • For commands that apply to a number of bundles, use the bundle groups defined in bundle_groups.py
  • For commands that apply to specific file types, use the is_filetype helper in utils.py. This helper relies on the file type appearing in the window title. If you wish to use file type specific commands in an application that does not display the file type in the window title, either remove that application's bundle id from the file type sensitive bundles group, or add something that will match the window title to the list of file types for that context.

Gotchas

  • Some users may need to change the , mapping from "comma": "," to ",": ",".
  • Context names cannot have spaces
  • If your output is missing the odd random letter, try patching Talon's default delay
  • Refactoring is in progress and currently some commands in global contexts clash with others

Script-specific notes

  • speech_toggle.py: Note the 'dictation mode', which behaves similarly to dragon mode, but keeps Talon in control. It is a workaround for the inability of Dragon in 'dragon mode' to maintain focus on the front most application in some situations.
  • keeper.py: The phrase command will only preserve literally the first part of the utterance. Anything that might be a command after the first word will be interpreted as such. keeper tries to preserve everything.

Rules of precedence

The following have been empirically determined, could change at any point, and are not to be relied on:

  • Given two definitions for "foo" in the same keymap, the second will be used.
  • Given definitions for, 1. "foo " 2. "foo" and 3. "bar", saying "foo bar" will trigger (2) then (3) and saying "foo baz" will trigger (1).

More Repositories

1

tensorflow_hmm

A tensorflow implementation of an HMM layer
Jupyter Notebook
286
star
2

gphoto2-timelapse

time lapse camera driver
Python
42
star
3

graphcore

Graphcore is a python library which allows you to query a computational graph structure backed by multiple databases, python functions and/or 3rd party services
Python
12
star
4

luamidi

LuaMIDI provides a simple interface for sending and receiving MIDI messages. The C++ library RtMidi is used at the core so cross-platform support is provided.
C++
11
star
5

functioncache

provides a decorator to use on your python functions which caches results to file - based off of filecache
Python
6
star
6

LunaticPython

Lunatic Python is a two-way bridge between Python and Lua, allowing these languages to intercommunicate. Being two-way means that it allows Lua inside Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua inside Python, and so on.
C
5
star
7

bowling-brackets

Simple Webapp which will generate brackets for a simple bowling tournament
Python
4
star
8

ssc_32u

Provides high level API to robot arm controlled by SSC-32U
Python
3
star
9

simplesparql

SimpleSPARQL allows queries to SPARQL endpoints in a very simple language similar to MQL
Python
3
star
10

heattransfer

Very simple heat transfer simulator
Python
3
star
11

voicecode_community_packages

This is a place where voicecode users can all contribute custom packages in a central location
CoffeeScript
3
star
12

torch_temporal_to_spatial

A torch implementation of nn.TemporalConvolution using nn.SpatialConvolution(MM), which is much faster in the GPU
Lua
3
star
13

picloud-shell

a super simple shell for accessing picloud
2
star
14

ose-cebpress-controller-board

Source files for the Open Source Ecology CEB Press Controller Board
Arduino
2
star
15

voicecode_help_voice

add commands to voicecode which support quickly searching voicecode commands
CoffeeScript
2
star
16

zipcode-to-state

Given a zipcode, returns the abbreviated state id
2
star
17

kumquat

A clean and simple cms designed to store basic structured data alongside a wiki, meant originally for the management of a student farm.
Python
2
star
18

voicecode_sound_device

voicecode command for changing the output device of your sound on a mac
CoffeeScript
1
star
19

swarm

opengl swarm engine
C++
1
star
20

axpress-nlp

A system for translating string queries using formal grammar
Java
1
star
21

deepfreq

my exploration of generating sound, music and beats with neural networks
Jupyter Notebook
1
star
22

scloudradio

SoundCloud Radio
JavaScript
1
star
23

skype-toggle-mute

a simple script to toggle mute in skype on linux through dbus
Python
1
star
24

dotfiles

my dotfiles
Shell
1
star
25

python-ruby-tz

Maps Ruby's TimeZone names to UTC offsets in python.
Python
1
star
26

bigbrother

Turn skype into big brother
1
star
27

quiqi

a grease monkey script which inserts an answer to your search query if there is one
JavaScript
1
star
28

single-instance-app

A python framework for a single instance application. First call to the script spawns a process, subsequent calls are passed to the first
Python
1
star