-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a global settings application #60
Comments
Okay so this wouldn't be too hard: Nearly everything is done using window properties, and a small number of things are done using ClientMessage:s. The sources for the command-line interface glass-action should be a good place to start. It uses the InfiniteGlass python library, which is actually just a thin wrapper on top of python-xlib. There are also some documentation, but it's far from complete. For a settings app, I guess you mostly need to have it change the config files, then reload one of the components (the only one that can't be restarted is glass-ghosts, but it could be made to be able to reload its config file). For this, there is good example code in glass-action. Is this something you'd like to experiment with? |
Btw, I'd recommend playing around with glass-action, starting with
|
Yes, I'd like to experiment with this. Exploring the source has been interesting but there are still too many things I don't know yet. Just trying to find ways to contribute... Does glass-action have code to save and restore an application? An important feature to learn how to do! |
Only sort of. It has a method to send any message to a window, which is what's used to sleep it.
|
How would I tell the settings application how to save its state? You had mentioned before about pysmlib or something. |
There are two ways that an app can be made to save/restore state: The proper way: The hack: |
Thanks! The proper way is simple enough. Though, today I will stick to finish the other window decorations animation to show you. |
We could use an ORM to deal with this problem. The following frameworks will work in Python and SQLite. The idea would be to maintain information in a database instead of configuration files. A check would be performed on the YAML files at startup and insert changes in the database when necessary. Then, when a new version of InifiniteGlass is released and has a new schema, it will be possible to perform a migration (up or down, if downgrade) that will rework the YAML and thus ensuring that we do not mess up user configuration and that it is usable for new versions. Django ORM (standalone) | SQLAlchemy | Pony ORM |
Related to #55 |
A global settings application written in Python and Tkinker should be a sound proposition. How would you go about to use InfiniteGlass libraries to properly interface the application with the window manager?
The text was updated successfully, but these errors were encountered: