Talon usage

From wikinotes

WARNING:

These notes are for the knausj repo defaults. I have my own repo now with my own (more consistent) commands


Generic

Talon

talon wake/sleep

dictation mode    # type words as you speak
command mode      # default command mode

${command} third    # repeats command 3x times
repeat that [third] # repeat once, or N times

Help Menu

help alphabet       # words for indv keys (ex: air,bat,cap)
help context        # defined commands

help next/previous  # switch pages
help close

WM Navigation

running list/hide  # list avail windows
focus ${program}   # focus window

mute/unmute        # volume
volume down/up     # volume down/up

page down/up       # page down/up

Key Names

  • individual keys have words assigned to them. See help alphabet
# modifiers
super    # win
alt
control
shift
# punctuation
left/right paren   # ()
left/right bracket # {} 

dollar  # $
comma   # ,
period  # .

Coding

NOTE:

use letters/numbers in vim rather than 'go line start' etc.
There may also be a vim mode with things like goto etc...

Formatters

See https://github.com/knausj85/knausj_talon/blob/master/code/formatters.py#L146

format help  # toggle open/close formatter win

snake   cat dog snake  # cat_dog_snake
hammer  cat dog snake  # CatDogSnake
camel   cat dog snake  # catDogSnake
packed  cat dog snake  # cat::dog::snake

string    cat dog snake   # 'cat dog snake'
dubstring cat dog snake   # "cat dog snake"

# they can be combined:
packed                     # hello::world
title                      # Hello World
title packed hello world   # Hello::World

Line Editing

clear left   # backspace
clear right  # delete
go line start/end
go word left/right
go left/right/up/down

clear up/down
clear word
clear word left/right

select line

word ${word}  # insert word

Language Modes

force python
force markdown
force go
force see plus plus
force see sharp
# ...


Integrations

Enabling Integrations

*.talon files that define a tag: in their header (before '-') must be enabled in order to be used.

Enable them by adding tag(): ${tagname} to settings.talon

# ~/.talon/user/knausj_talon/settings.talon
tag(): user.i3wm
tag(): user.tmux
tag(): user.git

Tmux

mux split horizontal/vertical   # split
mux move up/down/left/right     # select pane
mux window ${NUM}               # select tab
mux window new

i3wm

win left/right/up/down   # select window
win kill                 # close window
full screen/scuba        # toggle fullscreen
resize mode              # enter resize mode
move window port ${num}  # move window

git

git checkout $branch

Dunst

dunst show notifications  # show notifications
dunst dismiss             # dismiss notification