Page 9 of 24 FirstFirst ... 789101119 ... LastLast
Results 81 to 90 of 232

Thread: Conky Exaile Python Script

  1. #81
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Exaile Python Script

    Quote Originally Posted by Tick-Tock View Post
    I, it's me. Again

    I followed the instructions in this post, and it works, but i see that now the cpu's are working on 100% or near, suddendly when i edited the /etc/crontab file (maybe i edited it bad? ).

    Suggestion?

    EDIT

    Sorry, my bad: the cpu was occupied by another process that i didn't close well.
    The script works, even if it's quite laggy (30 second in medium case I think). I've not understood well ho works the script made by stepper... it's better?
    Are you solely talking about scripts for handling the exaile process for conky to work with a is_running option?

    If so I really don't know anything, works by default for me, can you help akahige?

  2. #82
    Join Date
    Apr 2007
    Beans
    123

    Re: Conky Exaile Python Script

    Quote Originally Posted by Tick-Tock View Post
    I, it's me. Again

    EDIT

    Sorry, my bad: the cpu was occupied by another process that i didn't close well.
    The script works, even if it's quite laggy (30 second in medium case I think). I've not understood well ho works the script made by stepper... it's better?
    I have no idea about stepper's script. Seems like you should either use his script or mine. So far as mine goes... I didn't write it, I basically threw myself on the mercy of the good folks over on the conky channel and they helped by doing the heavy lifting and working out what I couldn't.

    Having said that, it sounds like now that you identified the CPU issue as having nothing to do with conky, exaile, conkyexaile, or the script, the issue is that the Is It Running script is "laggy". It sounds to me as if it's working as advertised.

    The short answer is "of course it's going to be laggy" since crontab WILL NOT do any action more frequently than every one minute. Therefore, depending on where your action of starting or stopping exaile (or whatever you mod the script to do) falls in that cycle, conky could respond instantaneously... or it could take up to a minute... or it could be anywhere in between.

    My presumption is that crontab activity is synced to the system clock and if that's true, you should be able to start and stop exaile at different times and see how the script reacts. That, however, is just a guess. I didn't bother to do any research to see how it works.

    Does any of this in any way help...? (Or even make sense?)

  3. #83
    Join Date
    Jan 2005
    Location
    Johannesburg, SA
    Beans
    63
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Conky Exaile Python Script

    Ok, lets clear something here!

    I did not create a script but only created a file called 'playing' in my home folder which just contains the words 'Playing'.
    Then I typed commands in my conkyrc that instructs conky to create a file called 'status' in my home folder, and compare the files by using the 'diff' command. If the file contents are the same the results will be empty (or no output) then conky shows the exaile info based on your template.

    I'm not sure if Tick-Tock is trying to use both methods at the same time.
    I went this route because I had a problem with crontab.

  4. #84
    Join Date
    Apr 2007
    Beans
    123

    Re: Conky Exaile Python Script

    stepper:

    I'm not really sure if your comment was aimed at something I said, but in reading over your last couple of posts, I'm not entirely clear on what your script does vs. what mine does. You mentioned that you went the route that you did with your script because crontab didn't work for you. If I'm understanding correctly, we may be talking across purposes here. The conky status display I'm using is due to the conkyexaile script.

    The only thing that my script does is completely hide the conkyexaile template if exaile isn't running.

  5. #85
    Join Date
    Jan 2009
    Beans
    13

    Re: Conky Exaile Python Script

    Quote Originally Posted by akahige View Post
    I have no idea about stepper's script. Seems like you should either use his script or mine. So far as mine goes... I didn't write it, I basically threw myself on the mercy of the good folks over on the conky channel and they helped by doing the heavy lifting and working out what I couldn't.

    Having said that, it sounds like now that you identified the CPU issue as having nothing to do with conky, exaile, conkyexaile, or the script, the issue is that the Is It Running script is "laggy". It sounds to me as if it's working as advertised.

    The short answer is "of course it's going to be laggy" since crontab WILL NOT do any action more frequently than every one minute. Therefore, depending on where your action of starting or stopping exaile (or whatever you mod the script to do) falls in that cycle, conky could respond instantaneously... or it could take up to a minute... or it could be anywhere in between.

    My presumption is that crontab activity is synced to the system clock and if that's true, you should be able to start and stop exaile at different times and see how the script reacts. That, however, is just a guess. I didn't bother to do any research to see how it works.

    Does any of this in any way help...? (Or even make sense?)
    Hi. I understood that the script that you posted is obviously laggy, after some experiments it seems that is as you said, crontab works when the minute changes. What I asked is a little explanation about the script posted by stepper 'cause I would better understand how it works, to compare the two scripts.
    It's not my intention to injure anyone, or make comparison between the poster... i'm sorry but my english is poor and probably I made some mistakes writing that would be misinterpreted by my fault...

    Quote Originally Posted by stepper View Post
    Ok, lets clear something here!

    I did not create a script but only created a file called 'playing' in my home folder which just contains the words 'Playing'.
    Then I typed commands in my conkyrc that instructs conky to create a file called 'status' in my home folder, and compare the files by using the 'diff' command. If the file contents are the same the results will be empty (or no output) then conky shows the exaile info based on your template.

    I'm not sure if Tick-Tock is trying to use both methods at the same time.
    I went this route because I had a problem with crontab.
    Actually I'm using the method with crontab, but I would try both, that's why I asked you to explain the functioning of it.

  6. #86
    Join Date
    Jan 2005
    Location
    Johannesburg, SA
    Beans
    63
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Conky Exaile Python Script

    Quote Originally Posted by akahige View Post
    stepper:

    I'm not really sure if your comment was aimed at something I said, but in reading over your last couple of posts, I'm not entirely clear on what your script does vs. what mine does. You mentioned that you went the route that you did with your script because crontab didn't work for you. If I'm understanding correctly, we may be talking across purposes here. The conky status display I'm using is due to the conkyexaile script.

    The only thing that my script does is completely hide the conkyexaile template if exaile isn't running.
    My comments were not aimed at anyone per se, I was just trying to explain what I did to show info in conky. Maybe it came out wrong, for that: apologies.

    Quote Originally Posted by Tick-Tock View Post
    Hi. I understood that the script that you posted is obviously laggy, after some experiments it seems that is as you said, crontab works when the minute changes. What I asked is a little explanation about the script posted by stepper 'cause I would better understand how it works, to compare the two scripts.
    It's not my intention to injure anyone, or make comparison between the poster... i'm sorry but my english is poor and probably I made some mistakes writing that would be misinterpreted by my fault...



    Actually I'm using the method with crontab, but I would try both, that's why I asked you to explain the functioning of it.
    Tick-Tock:

    Here is the procedure to my method:

    1.Create a file called 'playing' in your home folder
    Code:
    gedit ~/playing
    2. type Playing in the file and save.
    3.Edit your .conkyrc and type in the following:
    ${exec conkyExaile -t /usr/share/conkyexaile/example/conkyExaile.template | grep "Status" |cut -c26- > ~/status}
    ${if_empty ${exec diff ~/playing ~/status}}
    ${execp conkyExaile --template=/usr/share/conkyexaile/example/conkyExaile.template}
    ${endif}
    The first command in conkyrc tells conky to create a file called status and put in the status of exaile: 'Unknown, Playing or Stopped' in that file ~/status.
    The diff command compares the two files ~/playing and ~/status and if they are the same it means difference is zero or none, then the exaile info is shown in conky as explained by the $if_empty variable here.
    Hope it makes sense...

  7. #87
    Join Date
    Jan 2009
    Beans
    13

    Re: Conky Exaile Python Script

    Quote Originally Posted by stepper View Post
    Here is the procedure to my method:

    1.Create a file called 'playing' in your home folder
    Code:
    gedit ~/playing
    2. type Playing in the file and save.
    3.Edit your .conkyrc and type in the following:

    The first command in conkyrc tells conky to create a file called status and put in the status of exaile: 'Unknown, Playing or Stopped' in that file ~/status.
    The diff command compares the two files ~/playing and ~/status and if they are the same it means difference is zero or none, then the exaile info is shown in conky as explained by the $if_empty variable here.
    Hope it makes sense...
    Ok, I think I've understood. At the first time i tried to change the template because I don't like too much the one in /example/ and I retrieve an error. Tried even with if/else, changing the status file and the grep command etc, instead the better and simplier way is to create another template and add it in the third line like this:

    Code:
    ${exec conkyExaile -t /usr/share/conkyexaile/example/conkyExaile.template | grep "Status" |cut -c26- > ~/status}
    ${if_empty ${exec diff ~/playing ~/status}}
    ${execp conkyExaile --template=/usr/share/conkyexaile/myConkyExaile.template}
    ${endif}
    Now it works properly and without lag, tjanks to all

    @ kaivalagi

    I don't know why, but I notice that now the problem with the umlaut is well fixed: "Böhse Onkelz" in exaile become "Böhse Onkelz" in conky without any problem. I think it's probably because i use "execp" instead of "exec" in the code, but i'm not sure...
    Last edited by Tick-Tock; January 8th, 2009 at 04:41 PM.

  8. #88
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Exaile Python Script

    Quote Originally Posted by Tick-Tock View Post
    @ kaivalagi

    I don't know why, but I notice that now the problem with the umlaut is well fixed: "Böhse Onkelz" in exaile become "Böhse Onkelz" in conky without any problem. I think it's probably because i use "execp" instead of "exec" in the code, but i'm not sure...
    So you mean it's fixed with the latest script I gave you or with the current live version available via apt?

    This confirms either way that conky plays a significant part in screwing with unicode text support...

  9. #89
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Exaile Python Script

    UPDATE

    Fixed the script to handle unicode output better (I hope)

    The first post has been updated and the apt package should be available soon

  10. #90
    Join Date
    Jan 2009
    Beans
    13

    Re: Conky Exaile Python Script

    Quote Originally Posted by kaivalagi View Post
    So you mean it's fixed with the latest script I gave you or with the current live version available via apt?

    This confirms either way that conky plays a significant part in screwing with unicode text support...
    I don't know if it works thanks to the new .py you gave me o why i use the execp command instead of exec...

Page 9 of 24 FirstFirst ... 789101119 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •