Okay, so, for the last two week or so (ignoring a day or two to reflash and restore all my stuff to PR1.3, and a day or so - counting sleep - when I was fiddling with garage.maemo.org, Advanced Interface Switcher and Advanced Power, and subversion, to figure out how to test the latest version and report bugs to dev while trying to learn the code some), I've been working on a little pet project of mine - making a conky config file which would switch layouts when the device rotated to portrait mode, so as to allow conky to be used in portrait mode, basically.
Now, I figured out how to query device orientation from the command line. I figured out grep and awk, until I could finally get it into an if-then statement which Conky could run. It took me a few days of digging around completely unintuitive (at least to me, with almost no coding language knowledge) documentation, various threads, etc. Then PR1.3 hit and the forums became inconsistently usable for those few days, so I took the time to reflash to 1.3, install most of what I wanted back on the N900, and so on. Since then I've been continuing to dig around for this stuff in all the spare time that I have. I have figured out, after by sheer dumb luck stumbling upon it in someone's python code while looking up something else) how to query whether the keyboard was open or closed from command line, and incorporated that into my conky.conf as well.
But I still haven't figured out how to actually set an application's rotation-enabled flag on from the command line. Now, to those of you oh-so-tempted to tell me to read the documentation at this point: Either you didn't understand what I'm asking, or the documentation you're thinking of doesn't actually say what you think it says, or it's buried behind some labyrinth of search terms and links that I have not been able to find.
Here's the thing - I am not the developer of Conky. I can't just go write a patch in C (which the latest Conky port uses, as I understand it, is) for it either, because I honestly would be doing everyone a disservice due to my lack of coding knowledge (working on it, but not nearly there yet). Now, for those that don't know, Conky can run shell commands, and print whatever comes out to stdout. That's why I couldn't just copy those widely available chunks of python code for querying device orientation - I had to figure out the proper way of wording a dbus-send command from that code before I could use it in conky.
Consequently, what I need is very limited. I can't just take a python or C or Qt or whatever code chunk and run it from Conky, AFAIK. Conky might be able to execute a shell command which in turn executes a python script, and that's something I could work with, but then I have to know how to make that python script enable rotation either system-wide - like shortcutd's enable rotation mechanism works - or for a specific process. (I've looked at rotate.py from forever ago, and a few other bits of python code, flung around talk.maemo.org, but none of them seem to be capable of doing what I'm looking for though)
And frankly, I'm not even asking you all to spell it out for me. Just point me to the page with the right DBus call documented or something, and I'll be fine. (Though please do make sure the doc you're linking me to actually has what I'm asking for. Because I'm fine with being condescendingly pointed towards documentation and being told "read it", but it does no one any good if the doc in question doesn't actually have what I am looking for.) Hell, even point me to a specific page in this (I know I sure can't find it in there if it exists, in a way that can be adapted for command-line use, but it's possible I missed it): http://maemo.org/api_refs/5.0/5.0-final/ and I will do my best to figure it out from there.
As I understand it, any number of things would work - a DBus call to enable rotation in a specific process - a DBus call to imitate keyboard presses (if it can do the Ctrl+Shift+R combo simultaneously), a DBus call to enable rotation on all running processes, or any shell command that is capable of doing the same thing.
Yes I get that the people using a portrait-mode-supporting config file CAN just download shortcutd or one of the other apps, or run Ctrl+Shift+R every time they want to. But it's not ideal, and I'd like people to be able to use this anyway, without having to triple-key-combo or install shortcutd in order to conveniently take advantage of such a feature in a Conky config file.
And thank you in advance to anyone who helps, or sincerely tries to. I did my best to run every combination of search terms I could think of, through power search and normal search, and even ran some searches through Google on the internet as a whole. Read through everything that seemed remotely promising. If I completely missed something that has what I'm looking for, just link me to it and I'm more than happy to learn on my own from there.
Now, I figured out how to query device orientation from the command line. I figured out grep and awk, until I could finally get it into an if-then statement which Conky could run. It took me a few days of digging around completely unintuitive (at least to me, with almost no coding language knowledge) documentation, various threads, etc. Then PR1.3 hit and the forums became inconsistently usable for those few days, so I took the time to reflash to 1.3, install most of what I wanted back on the N900, and so on. Since then I've been continuing to dig around for this stuff in all the spare time that I have. I have figured out, after by sheer dumb luck stumbling upon it in someone's python code while looking up something else) how to query whether the keyboard was open or closed from command line, and incorporated that into my conky.conf as well.
But I still haven't figured out how to actually set an application's rotation-enabled flag on from the command line. Now, to those of you oh-so-tempted to tell me to read the documentation at this point: Either you didn't understand what I'm asking, or the documentation you're thinking of doesn't actually say what you think it says, or it's buried behind some labyrinth of search terms and links that I have not been able to find.
Here's the thing - I am not the developer of Conky. I can't just go write a patch in C (which the latest Conky port uses, as I understand it, is) for it either, because I honestly would be doing everyone a disservice due to my lack of coding knowledge (working on it, but not nearly there yet). Now, for those that don't know, Conky can run shell commands, and print whatever comes out to stdout. That's why I couldn't just copy those widely available chunks of python code for querying device orientation - I had to figure out the proper way of wording a dbus-send command from that code before I could use it in conky.
Consequently, what I need is very limited. I can't just take a python or C or Qt or whatever code chunk and run it from Conky, AFAIK. Conky might be able to execute a shell command which in turn executes a python script, and that's something I could work with, but then I have to know how to make that python script enable rotation either system-wide - like shortcutd's enable rotation mechanism works - or for a specific process. (I've looked at rotate.py from forever ago, and a few other bits of python code, flung around talk.maemo.org, but none of them seem to be capable of doing what I'm looking for though)
And frankly, I'm not even asking you all to spell it out for me. Just point me to the page with the right DBus call documented or something, and I'll be fine. (Though please do make sure the doc you're linking me to actually has what I'm asking for. Because I'm fine with being condescendingly pointed towards documentation and being told "read it", but it does no one any good if the doc in question doesn't actually have what I am looking for.) Hell, even point me to a specific page in this (I know I sure can't find it in there if it exists, in a way that can be adapted for command-line use, but it's possible I missed it): http://maemo.org/api_refs/5.0/5.0-final/ and I will do my best to figure it out from there.
As I understand it, any number of things would work - a DBus call to enable rotation in a specific process - a DBus call to imitate keyboard presses (if it can do the Ctrl+Shift+R combo simultaneously), a DBus call to enable rotation on all running processes, or any shell command that is capable of doing the same thing.
Yes I get that the people using a portrait-mode-supporting config file CAN just download shortcutd or one of the other apps, or run Ctrl+Shift+R every time they want to. But it's not ideal, and I'd like people to be able to use this anyway, without having to triple-key-combo or install shortcutd in order to conveniently take advantage of such a feature in a Conky config file.
And thank you in advance to anyone who helps, or sincerely tries to. I did my best to run every combination of search terms I could think of, through power search and normal search, and even ran some searches through Google on the internet as a whole. Read through everything that seemed remotely promising. If I completely missed something that has what I'm looking for, just link me to it and I'm more than happy to learn on my own from there.