• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

AUTHORSH A D26-Aug-200130 21

COPYINGH A D26-Aug-200117.6 KiB340281

ChangeLogH A D13-Dec-20041.4 KiB5232

MakefileH A D03-May-2022448 117

READMEH A D13-Dec-20045.8 KiB156114

erase_cursor.xbmH A D26-Aug-2001973 1817

erase_cursor_mask.xbmH A D26-Aug-2001998 1817

gromit.cH A D13-Dec-200448.1 KiB1,6991,334

gromitrcH A D26-Aug-2001736 2720

gromitrc_gsrH A D12-Dec-20012.3 KiB7157

paint_cursor.xbmH A D26-Aug-2001944 1716

paint_cursor_mask.xbmH A D26-Aug-2001969 1716

README

1Gromit
2----------
3
4Gromit (GRaphics Over MIscellaneous Things) is a small tool to make
5annotations on the screen.
6
7When making presentations of the Gimp I found myself often moving the
8mousepointer around the point of interest until hopefully everybody
9noticed it. This annoyed me, since it is a very vague way to highlight
10something. I dreamt of a small programm which allows me to simply draw
11on the screen, ignoring any window-borders.
12
13Gromit is a first implementation of this program.
14
15The main usage problem of Gromit is its activation. You need a special
16command to make Gromit grab the mouse, since you typically want to use
17the program you are demonstrating and highlighting something is a short
18interruption of your workflow.
19
20Gromit offers two ways to make this possible. It grabs the "Pause" key, so
21that no other application can use it and it is available to Gromit only.
22The available commands are:
23
24   Pause:       toggle painting
25   SHIFT-Pause: clear screen
26   CTRL-Pause:  toggle visibility
27   ALT-Pause:   Quit Gromit.
28
29You can specify the key to grab via "gromit --key <keysym>". Specifying
30an empty string or "none" for the keysym will prevent gromit from grabbing
31a key.
32
33Alternatively you can invoke Gromit with various arguments to control an
34already running Gromit (If you are curious: Communication between two
35gromit instances is done via a special X-Selection).
36
37Usage:
38  gromit --quit
39      will cause the main Gromit process to quit (or "-q")
40  gromit --toggle
41      will toggle the grabbing of the cursor (or "-t")
42  gromit --visibility
43      will toggle the visibility of the window (or "-v")
44  gromit --clear
45      will clear the screen (or "-c")
46
47If activated Gromit prevents you from using other programs with the
48mouse. You can press the button and paint on the screen. Key presses
49(except the "Pause"-Key, see above) will still reach the currently active
50window but it may be difficult to change the window-focus without mouse...
51The next "gromit --toggle" will deactivate Gromit and you can use your
52programs as usual - only the painted regions will be obscured.
53
54Gromit is pressure sensitive, if you are using properly configured
55XInput-Devices you can draw lines with varying width. It is
56possible to erase something with the other end of the (Wacom) pen.
57
58
59
60Building:
61
62Gromit is small and lightwight. It needs GTK+ 2.X to build and the Makefile
63is straightforward. No need for autoconf/automake yet  :-)
64Simply type "make" and copy the resulting binary to a convenient place.
65Stripping the binary can reduce its size. I just tested it on
66Linux/XFree86, reports from other platforms are welcome.
67
68
69Configuration:
70
71Gromit is configurable via the file ".gromitrc" in your Homedirectory.
72Here you can specify which Device/Button/Modifier combination invokes
73which tool. See the file "gromitconf" distributed with this program for
74an example. An overview on the syntax:
75
76     # Comments can be either # Shell-Style or
77     /* C-Style. */
78
79This entry defines the tool "red Pen", a pen with size 7 and color red.
80You can specify the color in X-Style: e.g. "#FF0033" or
81colors from rgb.txt.
82
83     "red Pen" = PEN (size=7 color="red");
84
85The following Entries copy an existing configuration (in this case
86"red Pen") and modify the color.
87
88     "blue Pen" = "red Pen" (color="blue");
89     "yellow Pen" = "red Pen" (color="yellow");
90
91You can also draw lines that end in an arrow head. For this you
92have to specify "arrowsize". This is a factor relative to the width
93of the line. For reasonable arrowheads start with 1.
94
95     "blue Pen" = "blue Arrow" (arrowsize=2);
96
97An "ERASER" is a tool that erases the drawings on screen.
98The color parameter is not important.
99
100     "Eraser" = ERASER (size = 75);
101
102A "RECOLOR"-Tool changes the color of the drawing without changing
103the shape. Try it out to see the effect.
104
105     "green Marker" = RECOLOR (color = "Limegreen");
106
107
108If you define a tool with the same name as an input-device
109(see the output of "xsetpointer -l", if there is a "SWITCH"-Tool
110it is uninteresting...) this input-device uses this tool.
111Additionally you can limit the Scope to specific combinations of
112Mousebuttons (1,2,3,4,5 or Button1,...,Button5)
113and Modifiers (SHIFT, CONTROL, ALT, META, while ALT==META).
114
115     "Core Pointer" = "red Pen";
116     "Core Pointer"[SHIFT] = "blue Pen";
117     "Core Pointer"[CONTROL] = "yellow Pen";
118     "Core Pointer"[2] = "green Marker";
119     "Core Pointer"[Button3] = "Eraser";
120
121The descision, which tool to use follows a simple policy:
122  a) Buttons are more important than Modifiers
123  b) Low number Buttons are more important than higher ones
124  c) Modifiers: SHIFT > CONTROL > ALT/META.
125  d) Gromit tries partial matches:
126      If you define "Core Pointer"[] and "Core Pointer"[SHIFT, CONTROL]
127      and only SHIFT actually is pressed, Gromit will use the second
128      definition if there is no "Core Pointer"[SHIFT] definition.
129      Same logic goes for the buttons.
130
131
132Problems:
133
134Gromit may drastically slow down your X-Server, especially when you draw
135very thin lines. It makes heavily use of the shape extension, which is
136quite expensive if you paint a complex pattern on screen. Especially
137terminal-programs tend to scroll incredibly slow if something is painted
138over their window. There is nothing I can do about this.
139
140Gromit partially disables DnD, since it lays a transparent window across
141the whole screen and everything gets "dropped" to this (invisible)
142window. Gromit tries to minimize this effect: When you clear the screen
143the shaped window will be hidden. It will be resurrected, when you want
144to paint something again. However: The window does not hide, if you
145erase everything with the eraser tool, you have to clear the screen
146explicitely with the "gromit --clear" command or hide Gromit with
147"gromit --visibility".
148
149This Program is distributed under the Gnu General Public License. See
150the file COPYING for details.
151
152
153Have fun,
154	Simon Budig <simon@budig.de>
155
156