Timer Plasmoid Companion Script

Utilities

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
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:

10 years ago

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/08)
Initial release

LaCiccia

5 years ago

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.

Report

10 years ago

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/08)
Initial release

12345678910
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description PackagetypeArchitectureRelease Channel Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.2.0
updated Mar 11 2010
added Dec 05 2008
downloads 24h
0
page views 24h 2
System Tags app software