Timer Plasmoid Companion Script

Utilities

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Available as/for:
Description:
Summary
I never really cared much for GUI alarm clocks - they always felt like time wasters when I could just run something like "sleep 30m && mplayer -loop 0 /path/to/sound.file" and be done with it. Then I discovered the outstanding Timer plasmoid that ships with KDE 4.2. It did have one big caveat though: in its current state, there's no convenient way to have it play a sound repeatedly until the user acknowledges the alarm (Yes, I know I could put the aforementioned MPlayer command in the command field, but then I'd have to open a terminal to kill mplayer).

So I did what I always do when I run into an easy problem like that - whipped up a hacky-tacky little script to "fix" it. By default, it uses MPlayer to loop /usr/share/sounds/KDE-Sys-App-Positive.ogg until the user clicks OK in the dialog window that pops up (it uses KDialog for this, hence it being on kde-apps.org). If you don't have MPlayer installed, or you don't like the sound it plays, feel free to change it.

I mostly made this so I could use it with the Timer plasmoid, but you can also run it stand-alone. Run "tpcs --help" for details.

Instructions
Download the script and put it in your path (~/.local/bin, for example, but make sure ~/.bash_profile contains this line: PATH=~/.local/bin:"${PATH}").
Optional
Tell the Timer plasmoid (or whatever other program you may want to call it from) to run tpcs, as shown in the first screenshot.

TODO
Make sure MPlayer and the default sound file exist on the user's system; offer option to change them.

I'm open to suggestions for anything else.
Last changelog:

0.2.0 (3/11/10)
Use amixer to set Master and PCM volumes to 100% and 90%, respectively
Change default sound file to /usr/share/sounds/KDE-Sys-App-Positive.ogg, as some KDE users may not have Kopete installed
Minor code clean-up

0.0.99b (12/5/0
Initial release


Ratings & Comments

1 Comment

LaCiccia

Hi, I'm not very familiar with scripting, however I'm eager to learn how to work your script. I've downloaded the file on my Debian 7.3 KDE machine with Google Chrome browser. It saved it automatically as a Download KDE-Apps.org.txt file.

  • Is the extension of the file, ok?
  • Now, where do I move it? I've got nothing in ~/.local/bin, only got a folder in ~/.local/share
  • Where is this ~/.bash_profile file? I can't find it in my system.
  • Can you be a little more specific, please? I have Debian KDE desktop, as mentioned above.

    Pling
    0 Affiliates
    Details
    license
    version 0.2.0
    updated
    added
    downloads 24h 0
    mediaviews 24h 0
    pageviews 24h 0

    More Utilities from Contrast:

    SleepSafe
    Contrast
    last update date: 14 years ago

    Score 5.0

    Other Utilities:

    Gis Weather
    RingOV
    last update date: 8 years ago

    Score 8.0

    Splash Screen Manager
    zorinos
    last update date: 14 years ago

    Score 7.4

    BashStyle-NG
    Chrispy
    last update date: 9 years ago

    Score 6.1

    anymeal
    wedesoft
    last update date: 6 months ago

    Score 5.0

    MonA3XN 01
    A3XN
    last update date: 2 years ago

    Score 5.0

    SuperCalc (By Keshav bhatt)
    keshavnrj
    last update date: 10 years ago

    Score 5.0



    System Tags