~clarkema/galosh

c9b1035725bf5f027d5467c920b7962fa31ece71 — Mike Clarke 9 years ago 66e449d
[browser] Test for uzbl when not on OS X
1 files changed, 7 insertions(+), 0 deletions(-)

M perllib/Galosh/Browser.pm
M perllib/Galosh/Browser.pm => perllib/Galosh/Browser.pm +7 -0
@@ 19,6 19,7 @@ package Galosh::Browser;
use English;
use File::Glob ':glob';
use File::Spec;
use IPC::Cmd qw( can_run );
#use IO::Socket::UNIX qw( SOCK_STREAM );

sub send_command


@@ 104,6 105,12 @@ sub main
        exec( qq[osascript -e 'tell application "Safari"' -e 'set URL of last item of tabs of first item of windows to "$url"' -e 'end tell'] );
    }
    else {
        unless ( can_run('uzbl-tabbed') ) {
            print STDERR ("galosh-browser depends on `uzbl' on systems other than OS X.\n");
            print STDERR ("See www.uzbl.org or your package manager for more information.\n");
            exit 1;
        }

        my $tmp_dir = File::Spec->join( $main::galosh_dir, 'tmp' );
        my $fifo    = find_first_tab_fifo( $tmp_dir );