I’m currently working on system-wide macro recorder. It will be integrated into apps and window managers/compositors. It’s not common approach, because many macro recorder are integrated with app or with system. My macro recorder will be integrated with app to allow making it context-aware, so user select text and can select what he/she wanna trying to do (for example);
- Select only second line of text
- Select 50-70 character
- Select 50 character to end of line
- Etc.
Application (not system) will be responsible to talk with my macro recorder and tell it, which event are proceed, so application could asks user about context. Also, user may select windows to work with macro manager and it should be visible while play macro or not. Application tells macro recorder, what tags (strings) window have, identify window. When macro is recorder, apps inform my daemon, which version of application is required, so my daemon could asks application to emulate exactly version.
Application should register one’s description and description of parameters + security parameters. When user order to play macro and macro isn’t trust, macro daemon show, which application it will ran + description of each application. Macro daemon also allow user to set security parameters of each application before running macro. Start security parameter will be “Pass event after n seconds” or “Deny event after n seconds”. If macro daemon start macro in secure mode, it inform application about it, passes security parameter to it. That’s application responsibility to handle it’s own security parameter and depending on switched on security parameter, show warnings.
For example - application with button remove all under / will display warning, drawing red border around button, when macro request to click this button and asking user to process. If user select pass all events after 10 seconds, all files under / will be removed, when user don’t click application popup before that time.
I have some trouble with my daemon/client library. Especially I have trouble with X backend - i trying to set XProperty to WM area of window, but I cannot read this property in xprop, so I don’t known it’s set correctly. I must also making mutter/kwin working with my macro recording session daemon,