Closed treymerkley closed 5 years ago
On Tue, May 01 2018, Billy Wade wrote:
This may already exist and I just missed it.
No, there's none. The current behavior is pretty much the original behavior of the original screenkey.
You're right that a proper config file would make more sense in addition to the setting/GUI state.
Is there any way to do this? I'm thinking maybe altering the command to go to a shell script that concatenates the actual command with options set in a file in .config. I haven't messed with this sort of thing before, so there might be a better way of doing it.
On Tue, May 01 2018, Billy Wade wrote:
Is there any way to do this? I'm thinking maybe altering the command to go to a shell script that concatenates the actual command with options set in a file in .config. I haven't messed with this sort of thing before, so there might be a better way of doing it.
No easy way. Or, simply use a shell script that calls screenkey with the correct command arguments.
The GUI still needs a way to save state changed interactively. While some tools use ini-like files that get rewritten, I personally hate this behavior, as comments and ordering is lost.
Config parsing needs to be implemented separately. It's not hard to do if you used python (ConfigFile or IniFile do 90% of the job).
It's not hard to do if you used python (ConfigFile or IniFile do 90% of the job).
I'm still a junior, so that's a little bit outside of my Python experience, but I'll make a fork, poke around, and see what I come up with.
So looking at screenkey.py, could we use configparser (ConfigParser, I'm not sure if this is Python 3 or Python 2.7) to use a config to set the default options at around line 37?
Rather than having to write out all of the options, especially since, once set, they probably wouldn't see a lot of change, it would be easier to have the different settings abstracted into a config file.
This may already exist and I just missed it.