lyrics_leos [not working anymore]
hurra
Source i (link to git-repo or to original if based on someone elses unmodified work):
Now even works with gnome, thanks again to scott!
Now works with 1.4.5 again, thanks to scottmuz77
Changed the things aalcock mentioned
More Amarok 1.x Scripts from hurra:
Other Amarok 1.x Scripts:
© 2025 store.kde.org - The official KDE Store
All rights reserved. All trademarks are copyright by their respective owners. All contributors are responsible for their uploads.
Ratings & Comments
7 Comments
to get the script working with kde4 and amarok 1.4 you need to change line 11 to Quote:
if [ $(qdbus org.kde.krunner /ScreenSaver org.freedesktop.ScreenSaver.GetActive) = "true" ];then
As KDE4 is no more using DCOP the Script fails without the change.
I've recently had to use Amarok under Gnome. I've updated the script to work with Gnome which involved some slight refactoring. Since amarok seems to popular with Gnome users I expect others would benefit from this. Hurra if you are happy with this can you check it still works in KDE as I don't have access to KDE. Here it is inline as attachments don't seem to be supported (indentation seem to be lost also) << #!/bin/bash isScreenSaverBlanked () { # Check if GNOME is running if [ $GNOME_DESKTOP_SESSION_ID ]; then isBlanked=$(dbus-send --reply-timeout=2000 --print-reply --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.GetActive 2>&1 | grep boolean | grep true) if [ -n "$isBlanked" ];then return 1 fi else # assume KDE if [ $(dcop kdesktop KScreensaverIface isBlanked) = "true" ];then return 1 fi fi return 0 } while [ true ]; do isScreenSaverBlanked if [ $? = 1 ];then play_status=$(dcop amarok player status) if [ $play_status = 2 ];then $(dcop amarok player playPause) fi isScreenSaverBlanked while [ $? = 1 ]; do sleep 2 isScreenSaverBlanked done if [ $play_status = 2 ];then $(dcop amarok player playPause) fi fi sleep 5 done >>
This script is great but it stopped working for me when I upgraded to amarok 1.4.5. Replacing both occurences of dcop amarok player pause with dcop amarok player playPause fixes the problem.
Thanks, i made a new version.
Very useful script - It works fine for me. Two improvements:- The "sleep 1" is a bit quick for a script, I've upped it to 5 seconds,
- There is a loop while the screen saver is on with no sleep at all. I changed mine to:
b2=$(dcop kdesktop KScreensaverIface isBlanked)
while [ $b2 = "true" ];
do
b2=$(dcop kdesktop KScreensaverIface isBlanked)
sleep 2
done
Thanks, i made a new version, with the changes ;)
Very nice ;)