Hello I would like to start and stop rtorrent based on my screensaver. I used to do this awhile ago with ubuntu and still have my script which may be helpful to someone else.
However now I am using Fedora with KDE and the script no longer seems to work. Could someone please help me with either another solutions or assist me in getting this to work:
#!/usr/bin/perl
#gnome
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver',member='SessionIdleChanged'\"";
open (IN, "$cmd |");
while (<IN>) {
if (m/^\s+boolean true/) {
#when screensaver activates, run the following commands
#system("/home/eric/compiled/scripts/rtorrentstart");
system("touch /home/asoukenka/rtorrenthasstarted");
} elsif (m/^\s+boolean false/) {
#when screensaver deactivates, run the following commands
#system("kill `pgrep rtorrent`");
system("touch /home/asoukenka/rtorrenthasbeenkilled");
}
}
just found my old post where some people helped me with this
http://ubuntuforums.org/archive/index.php/t-977249.html