Quote:
Originally Posted by enigma9o7
So far I've learned pretty much every settings GUI is just changing some text file somewhere. And often it's easier just to edit the text file. The problem is finding which file, and I dunno, but once you find that, go from there.
Sorry, useless post.
|
Quote:
Originally Posted by bobl01
Well, normally you'd be correct. After some investigation I've discovered that the data is stored in ~/.e/e/config/<profileName>/e.cfg (Now I know why e is the most common letter in the English language ) But it's not text or XML as one might expect, it's actually pure binary! I've found enough clues to know where the key definitions are stored, but I've a long way to go before I can fully understand how the data is formatted, and a lot further to go before I can actually edit it and save a new version of the file.
That's why I was hoping for short cut to bypass the Settings Panel GUI.
|
Well the e developers in their infinite wisdom decided a long time ago to depart from the Unix tradition of storing most everything in text files to storing Enlightenment settings in binary files of their own creation. To me this isn't the best of ideas but somewhere online there is a post by
Raster defending this decision. I am too lazy to find said post but Moksha being an Enlightenment fork is stuck with this decision unless we decide to change the source code and modify this behavior. Such a change is, IMHO, to big of a refactor for to little benefit.
Quote:
Originally Posted by bobl01
I'm looking for a way to program a reasonably large number of keyboard shortcuts from a script without having to enter each one through the Settings Panel GUI.
Has anybody any ideas, please?
|
Interesting idea, and for now I am going to resist the temptation to go ahead and write one for you. I know how that would go from past experience, I would hack up something simple and simple minded in no time and the spend weeks improving it. That is after I made the decision of whether to do it in Bash, python, or even C or perhaps some other language.
Anyway, some ideas:
The
eet command, a part of EFL is the command that creates the binary config files you note. (~/.e/e/config/<profileName>/*.cfg)
There is no manual entry (man page) for eet. Creating man pages for various exes included with EFL and Moksha/Enlightenment is a tasks on our To-Do list. But of low priority. So for usage:
To apply to this example, if e.cfg is in the current directory:
Code:
eet -d e.cfg config e.txt
Decompresses e.cfg into the text file e.txt. Look in this file for
group "key_bindings" list
Add the key bindings you want to this group. I am uncertain whether order is important. But examining that file closely will show you the syntax and form of the bindings you wish to add. Once you have modified the file to your liking, you can compress it again with the command:
Code:
eet -e e.cfg config e.txt 1
You may have to restart Moksha/Enlightenment for the Binding(s) to take effect (uncertain). You can do this from a script or CLI by:
Code:
enlightenment_remote -restart
For reference you may wish to consult the source code for Moksha. Particularly,
e_bindings.h and
e_int_config_keybindings.c.
This should be more than enough information to get you started. I would however back up the original config file first ... just in case