Re: Conky Exaile Python Script
Quote:
Originally Posted by
akahige
Helped quite a bit, actually. I'd skimmed the updated readme, but didn't quite get that this was a new and necessary way of doing things, and not just an improved and compact one.
The one thing that I can't seem to grok -- and this wasn't real clear in the previous version, even though I got it to work -- is the way in which the custom status text is called. Where does it go?
I'm using this (or trying to):
Code:
Now [--datatype=ST --statustext=Playing,Paused,Stopped]:
...but it's not being read. Also tried it in front of the datatype (where it was in the initial incarnation that worked with the previous version), but it didn't work there, either.
If you're not concerned about CPU usage then running what you had before is fine, however using a template means everything will gather via a single dbus call and get output, so CPU usage should go down.
I'll take a look when I get home, maybe I've missed the --statustext setting out of the template functionality, so it's not getting picked up?
Re: Conky Exaile Python Script
Quote:
Originally Posted by
kaivalagi
If you're not concerned about CPU usage then running what you had before is fine, however using a template means everything will gather via a single dbus call and get output, so CPU usage should go down.
I'm not on the world's fastest system, so obviously, I'd like things as optimal as they can be -- or at least not horribly wasteful. :)
I didn't know about the template being a single dbus call. Now that you say it, it makes perfect sense. Of course, I also missed the part in the readme where you said that the short variable names aren't supported yet.
Quote:
Originally Posted by
kaivalagi
I'll take a look when I get home, maybe I've missed the --statustext setting out of the template functionality, so it's not getting picked up?
Well... If you can't see a problem with the data format that I'm using, then that should help eliminate my implementation as the part of the problem.
Looking forward to seeing what you discover...
Re: Conky Exaile Python Script
Quote:
Originally Posted by
akahige
I'm not on the world's fastest system, so obviously, I'd like things as optimal as they can be -- or at least not horribly wasteful. :)
I didn't know about the template being a single dbus call. Now that you say it, it makes perfect sense. Of course, I also missed the part in the readme where you said that the short variable names aren't supported yet.
Well... If you can't see a problem with the data format that I'm using, then that should help eliminate my implementation as the part of the problem.
Looking forward to seeing what you discover...
I have updated the script (locally) to accept the statustext from command line options or from the template now...
Thinking about it though, there is no reason why you shouldn't just set the statustext option up in the main exec call instead....it's not like you'll want 2 statuses in the same output with different text is it? At least not yet :)
On this basis I am not going to go through the hassle of releasing the changes just yet, I'll wait until there are enough of them to warrant it....or when my other project is finished first ;)
Re: Conky Exaile Python Script
Quote:
Originally Posted by
kaivalagi
I have updated the script (locally) to accept the statustext from command line options or from the template now...
Thinking about it though, there is no reason why you shouldn't just set the statustext option up in the main exec call instead....
You know... I almost tried that, but I was running short on time, and I figured that if it was an option, you'd have mentioned it. Sigh... :)
Quote:
Originally Posted by
kaivalagi
it's not like you'll want 2 statuses in the same output with different text is it? At least not yet :)
Ooh... multiple statuses... that could be fun... Although, I'll have to devote some thought to what the actual benefit would be. Sounds like you have something spiffy and evil in mind...
Quote:
Originally Posted by
kaivalagi
On this basis I am not going to go through the hassle of releasing the changes just yet, I'll wait until there are enough of them to warrant it....or when my other project is finished first ;)
That sounds totally reasonable. Except for the mention of the mysterious "other project". That's just cruel. At this rate, you should just call the phantom python monitor "Area 51". Whatever it is... I'm looking forward to seeing it in action.
1 Attachment(s)
Re: Conky Exaile Python Script
Quote:
Originally Posted by
kaivalagi
I don't know what can be done here
Try re-installing dbus and python-dbus, just in case...
This might take some effort, but could you run a live cd on the PC, once booted up, install conky from the repo, and the script from the deb file, and try it out.....I
Had a partial system crash and did a clean install of xubuntu 8.10; exaile and forecast scripts working just fine now.
Thanks for putting in all the time with these scripts.
Re: Conky Exaile Python Script
Quote:
Originally Posted by
ddnev45
Had a partial system crash and did a clean install of xubuntu 8.10; exaile and forecast scripts working just fine now.
Thanks for putting in all the time with these scripts.
My pleasure...
It's an addiction of sorts, much like messing with conky settings :)
1 Attachment(s)
Re: Conky Exaile Python Script
Thanks for this great script :D
-------------------------------------
i solved the problem for $if_running..
check what is your "ps aux | grep exaile" looks like
if your ps reply like this.. you will have to rename the process name
Code:
c0re 30372 9.5 5.3 158036 55312 ? Sl 02:41 0:51 python /usr/lib/exaile/exaile.py
here is the 13 steps HowTO:
step 1. download the attachment file.
step 2. save it
step 3. extract it; tar xzf PyInline-0.03.tar.gz
step 4. cd PyInline-0.03
step 5. chmod +x setup.py
step 6. sudo ./setup.py install
step 7. sudo gedit /usr/lib/exaile/exaile.py
step 8. find import sys
step 9. add after
Code:
import dl
import PyInline
import time
libc = dl.open('/lib/libc.so.6')
if libc != 0 : libc.call('prctl', 15, 'exaile\0', 0, 0, 0)
else : print ('prctl not called')
m = PyInline.build(code=r"""
#include <Python.h>
#include <stdio.h>
#include <string.h>
void set_argv(char *str){
int argc;
char **argv;
Py_GetArgcArgv(&argc, &argv);
strncpy(argv[0], str , strlen(str));
memset(&argv[0][strlen(str)], '\0', strlen(&argv[0][strlen(str)]));
}
""", language="C")
m.set_argv('exaile')
step 10. save the file.
step 11. run exaile
step 12. its should be working now :D
step 13. have fun
Re: Conky Exaile Python Script
Holy crap, that's a lot you have to go through to sort it, well done on figuring it out!
I am using exaile from the dev repo's and don't have the problem, could it be that version has been updated to work better?
Re: Conky Exaile Python Script
Quote:
Originally Posted by
kaivalagi
Holy crap, that's a lot you have to go through to sort it, well done on figuring it out!
I am using exaile from the dev repo's and don't have the problem, could it be that version has been updated to work better?
i am sorry. my english isnt well.. so explain it clearly.:(
EDIT: i mean what you meant by "could it be that version has been updated to work better"
Re: Conky Exaile Python Script
Quote:
Originally Posted by
x0x
i am sorry. my english isnt well.. so explain it clearly.:(
EDIT: i mean what you meant by "could it be that version has been updated to work better"
I've installed exaile using this apt source in /etc/apt/sources.list:
Code:
deb http://ppa.launchpad.net/exaile-devel/ubuntu intrepid main
You could try installing a newer version of exaile from this repo, it may well work fine without any modifications.