From 536f196c7e4ca57e9ea8abd0a81e7351fda37e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 27 Jul 2021 00:36:07 +0200 Subject: Open directories in new terminal window --- dwim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwim b/dwim index 04e2632..fae2630 100755 --- a/dwim +++ b/dwim @@ -27,7 +27,7 @@ my @PDF_VIEWER = ('xpdf'); my @MAN_VIEWER = (@OPENER, 'man'); my @MAILER = (@OPENER, 'mutt'); my @BROWSER = (@OPENER, 'w3m', '-title'); -my @FILE_BROWSER = ('rox'); +my @FILE_BROWSER = ('tterm'); my @MAILDIR_VIEWER = (@OPENER, 'mutt -f'); my $MAILROOT = env MAILROOT => '/home/john/mail/'; @@ -116,7 +116,7 @@ for ($phrase) { handle 'maildir / directory / file'; my $p = path $1; run @MAILDIR_VIEWER, $p if absp($p) =~ /^$MAILROOT/; - run @FILE_BROWSER, $p if -d absp($p); + do { cd $p; run @FILE_BROWSER } if -d absp($p); run @MAN_VIEWER, absp($p) if -e absp($p) and $p =~ /\.[1-9]$/; run @PDF_VIEWER, $p if -e absp($p) and $p =~ /\.pdf$/; run @EDITOR, $p if -e absp($p); -- cgit v1.2.3