-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
71 lines (57 loc) · 1.81 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
==========================================================
typoenforcer
==========================================================
a program to run live coding demos without actually typing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Requirements
============
- xwininfo from x11-utils
- python :)
- python-xlib for the Xlib module
Usage
=====
Have a file with the code you want to 'type' ready.
Open a terminal with python (or some other interpeter that can accept
commands, doesn't have to run in a terminal emulator).
Run typoenforcer.
It'll ask you for two things:
- the source file
- the target window
The first can be given on the command line and is otherwise selected
through a normal file-open dialog. The latter is selected by running
xwininfo (the cross-hair cursor...) to pick the window.
In the window displaying the source file, press Return to 'type'
one line. It is also possible to select more than one line with shift
and cursor keys or by using the mouse. If more than one line is
selected, they are 'typed' in turn. Afterwards, the next line after
the previous selection is selected.
Bugs
====
Characters outside of the ASCII realm are not supported. '_' is
delivered to the target window as a placeholder instead. Patches
welcome.
Using shift-arrows to modify the selected lines doesn't fully work:
nothing is selected at first, only the second and later tries
succeed. A problem with Tkinter.Listbox?
Ideas
=====
- support multiple targets (i.e. one python3, one python2.7).
- support shift-return to input the whole block until empty line
What works
==========
+ urxvt
+ xev
+ gnome-terminal
+ gedit
+ oowriter
+ abiword
+ galeon
+ gvim (in insert mode)
+ emacs
What doesn't (without focus)
============================
- konsole
- xterm
- mayavi
- firefox?
- idle