daily pastebin goal
24%
SHARE
TWEET

Ubuntu 10.04 PERL/BASH Lanch BASH CMD on Screensaver

a guest Nov 17th, 2012 18 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'\"";
  4.  
  5. open (IN, "$cmd |");
  6.  
  7. while (<IN>) {
  8.     if (m/^\s+boolean true/) {
  9.         system("qbittorrent");    
  10.     }
  11. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top