summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-06-21 00:23:23 +0200
committerJoe <rbo@gmx.us>2024-06-21 00:23:23 +0200
commitc09565a1e652b35b0b8a7fce40bbed282b0170ae (patch)
tree39d6e1894ab9ff63e5b21b2fa9192deb4e263a86 /.local
parentup (diff)
downloaddotfiles-bsd-c09565a1e652b35b0b8a7fce40bbed282b0170ae.tar.gz
dotfiles-bsd-c09565a1e652b35b0b8a7fce40bbed282b0170ae.tar.bz2
dotfiles-bsd-c09565a1e652b35b0b8a7fce40bbed282b0170ae.tar.xz
dotfiles-bsd-c09565a1e652b35b0b8a7fce40bbed282b0170ae.tar.zst
dotfiles-bsd-c09565a1e652b35b0b8a7fce40bbed282b0170ae.zip
up
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/dmsearch14
1 files changed, 12 insertions, 2 deletions
diff --git a/.local/bin/dmsearch b/.local/bin/dmsearch
index f13189d..edc91fb 100755
--- a/.local/bin/dmsearch
+++ b/.local/bin/dmsearch
@@ -2,14 +2,24 @@
use strict;
use warnings;
-use constant BROWSER_PATH => '/usr/local/bin/iridium';
+use Sys::Hostname;
+
+use constant {
+ BROWSER => '/bin/firefox',
+ HOSTNAME => (split /\./, hostname())
+};
sub main
{
my $choice;
my $url;
my $pid;
+ my $prefix;
+ $prefix = '/usr';
+ if (HOSTNAME eq "mars") {
+ $prefix += '/local';
+ }
$choice = `printf "" | dmenu -i -m 0 -p 'Search:'`;
if (not $choice) {
return;
@@ -18,7 +28,7 @@ sub main
$url = 'https://duckduckgo.com/?q=' . $choice;
$pid = fork();
if (not $pid) {
- exec(BROWSER_PATH, $url);
+ exec($prefix . BROWSER, $url);
}
return;
}