summaryrefslogtreecommitdiffstats
path: root/synfocus
blob: fe660a5314783052895d8671b6e62f80a8b7a08f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! perl


sub on_focus_out {
   my ($self) = @_;
   my $dest=`xdotool getactivewindow getwindowname 2>/dev/null`;
    if ($dest =~ /screen/) { return; }
   `synclient TouchpadOff=0`;
    #$! == 0 && `~/bin/notify-send "Urxvt" "Focus back"`;
   ()
}


sub on_focus_in {
    my ($self) = @_;
    #`xdotool getactivewindow getwindowname &>>/tmp/xlog`;
    `synclient TouchpadOff=1`;
    #$! == 0 && `~/bin/notify-send "Urxvt" "I'm back. For your keys only"`;
    ()
}