forked from bk138/gromit-mpx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
168 lines (117 loc) · 5.66 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Gromit-MPX
----------
Gromit-MPX is a multi-pointer port of the original Gromit annotation
tool (http://www.home.unix-ag.org/simon/gromit) by Simon Budig
It enables graphical annotations with several pointers at once and is
A LOT faster since it uses the XCOMPOSITE extension where
available. Also, it does not inhibit Drag-and-Drop like the original
Gromit tool.
What is it?
-----------
Gromit-MPX (GRaphics Over MIscellaneous Things) is a small tool to
make annotations on the screen.
Its main use is for making presentations of some application.
Normally, you would have to move the mouse pointer around the point of
interest until hopefully everybody noticed it. With Gromit-MPX, you
can draw everywhere onto the screen, highlighting some button or area.
How to use it
-------------
You can operate Gromit-MPX using its tray icon, but since you typically
want to use the program you are demonstrating and highlighting something
is a short interruption of your workflow, Gromit-MPX can be toggled on
and off on the fly via a hotkey:
Per default, it grabs the "F9" key, so that no other application can
use it and it is available to Gromit-MPX only. The available commands
are:
F9: toggle painting
SHIFT-F9: clear screen
CTRL-F9: toggle visibility
ALT-F9: Quit Gromit-MPX.
You can specify the key to grab via "gromit-mpx --key <keysym>". Specifying
an empty string or "none" for the keysym will prevent gromit from grabbing
a key.
Alternatively you can invoke Gromit-MPX with various arguments to control an
already running Gromit-MPX .
Usage:
gromit-mpx --quit
will cause the main Gromit-Mpx-MPX process to quit (or "-q")
gromit-mpx --toggle
will toggle the grabbing of the cursor (or "-t")
gromit-mpx --visibility
will toggle the visibility of the window (or "-v")
gromit-mpx --clear
will clear the screen (or "-c")
If activated Gromit-MPX prevents you from using other programs with the
mouse. You can press the button and paint on the screen. Key presses
(except the "F9"-Key, see above) will still reach the currently active
window but it may be difficult to change the window-focus without mouse...
The next "gromit-mpx --toggle" will deactivate Gromit-MPX and you can
use your programs as usual - only the painted regions will be obscured.
Gromit-MPX is pressure sensitive, if you are using properly configured
XInput-Devices you can draw lines with varying width. It is
possible to erase something with the other end of the (Wacom) pen.
Building it
-----------
Gromit-MPX is small and lightweight. It needs GTK+3 to build.
Simply type "configure", "make" and "make install".
If configure is not present, try rebuilding it with
"autoreconf --install".
Configuration:
-------------
Gromit-MPX is configurable via the file ".gromit-mpx.cfg" in your
Homedirectory. Here you can specify which Device/Button/Modifier
combination invokes which tool. See the file "gromitconf" distributed
with this program for an example. An overview on the syntax:
# Comments can be either # Shell-Style or
/* C-Style. */
This entry defines the tool "red Pen", a pen with size 7 and color red.
You can specify the color in X-Style: e.g. "#FF0033" or
colors from rgb.txt.
"red Pen" = PEN (size=7 color="red");
The following Entries copy an existing configuration (in this case
"red Pen") and modify the color.
"blue Pen" = "red Pen" (color="blue");
"yellow Pen" = "red Pen" (color="yellow");
You can also draw lines that end in an arrow head. For this you
have to specify "arrowsize". This is a factor relative to the width
of the line. For reasonable arrowheads start with 1.
"blue Pen" = "blue Arrow" (arrowsize=2);
An "ERASER" is a tool that erases the drawings on screen.
The color parameter is not important.
"Eraser" = ERASER (size = 75);
A "RECOLOR"-Tool changes the color of the drawing without changing
the shape. Try it out to see the effect.
"green Marker" = RECOLOR (color = "Limegreen");
If you define a tool with the same name as an input-device
(see the output of "xsetpointer -l", if there is a "SWITCH"-Tool
it is uninteresting...) this input-device uses this tool.
Additionally you can limit the Scope to specific combinations of
Mousebuttons (1,2,3,4,5 or Button1,...,Button5)
and Modifiers (SHIFT, CONTROL, ALT, META, while ALT==META).
"Core Pointer" = "red Pen";
"Core Pointer"[SHIFT] = "blue Pen";
"Core Pointer"[CONTROL] = "yellow Pen";
"Core Pointer"[2] = "green Marker";
"Core Pointer"[Button3] = "Eraser";
The descision, which tool to use follows a simple policy:
a) Buttons are more important than Modifiers
b) Low number Buttons are more important than higher ones
c) Modifiers: SHIFT > CONTROL > ALT/META.
d) Gromit-MPX tries partial matches:
If you define "Core Pointer"[] and "Core Pointer"[SHIFT, CONTROL]
and only SHIFT actually is pressed, Gromit-MPX will use the second
definition if there is no "Core Pointer"[SHIFT] definition.
Same logic goes for the buttons.
Potential Problems:
------------------
When there is no compositing manager such as Compiz or xcompmgr
running, Gromit-MPX falls back to a legacy drawing mode. This may
drastically slow down your X-Server, especially when you draw very
thin lines. It makes heavy use of the shape extension, which is
quite expensive if you paint a complex pattern on screen. Especially
terminal-programs tend to scroll incredibly slow if something is
painted over their window.
Like the original Gromit, this program is distributed under the Gnu General Public License. See
the file COPYING for details. Thanks to Simon for the groundwork done!
Christian Beier <[email protected]>