You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to be able to change the drawing tool from the command line, while the server is running. This would allow, for example, to use an external keypad with presets assigned to individual keys. A software like Keebie or actkbd could then be used to execute gromit-mpx with particular options, allowing to quickly switch the default tool. Alternatively, users could define keyboard shortcuts in their particular desktop environment (KDE, Gnome), and link them to particular gromit options. That way, many more styles could be made available, and one would not have to press SHIFT, ALT, or combinations of such keys while drawing.
Describe the solution you'd like
This would require an additional command-line option, for example something like this:
I have looked into the source code, and the implementation seems relatively straightforward. In fact, I have a working prototype that does exactly this, incl. passing command-line options to the running server (or is it called client?) and changing the tool. Currently, the pen details are hard-coded and not taken from the command line, but that would be easy enough.
The core of the parser in parse_config could be made a separate function that could be called with g_scanner processing a file (when reading the config) or a string (when parsing the new command line option).
What seems a bit awkward to me is that names need to be in quotes (this seems owed to the use of g_scanner), which means the command-line argument will have to be wrapped in single-quotes.
I could prepare a corresponding PR, but would like to hear about yours ideas. Would this be a useful option at all? What about the command-line syntax? Any implementation issues?
The text was updated successfully, but these errors were encountered:
I use drawing/annotation tools for teaching.
It would be great to be able to change the drawing tool from the command line, while the server is running. This would allow, for example, to use an external keypad with presets assigned to individual keys. A software like Keebie or
actkbd
could then be used to executegromit-mpx
with particular options, allowing to quickly switch the default tool. Alternatively, users could define keyboard shortcuts in their particular desktop environment (KDE, Gnome), and link them to particular gromit options. That way, many more styles could be made available, and one would not have to press SHIFT, ALT, or combinations of such keys while drawing.Describe the solution you'd like
This would require an additional command-line option, for example something like this:
Implementation
I have looked into the source code, and the implementation seems relatively straightforward. In fact, I have a working prototype that does exactly this, incl. passing command-line options to the running server (or is it called client?) and changing the tool. Currently, the pen details are hard-coded and not taken from the command line, but that would be easy enough.
The core of the parser in
parse_config
could be made a separate function that could be called with g_scanner processing a file (when reading the config) or a string (when parsing the new command line option).What seems a bit awkward to me is that names need to be in quotes (this seems owed to the use of g_scanner), which means the command-line argument will have to be wrapped in single-quotes.
I could prepare a corresponding PR, but would like to hear about yours ideas. Would this be a useful option at all? What about the command-line syntax? Any implementation issues?
The text was updated successfully, but these errors were encountered: