diff options
author | Joe <rbo@gmx.us> | 2024-12-26 16:53:50 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-26 16:53:50 +0100 |
commit | 082f5a06a46c2f4eb3860daa68887712c609ac77 (patch) | |
tree | 6e1c6f84db6a6b04044d334bba62b4719c033cb9 /.local/bin/dmbook | |
parent | up (diff) | |
download | dotfiles-bsd-082f5a06a46c2f4eb3860daa68887712c609ac77.tar.gz dotfiles-bsd-082f5a06a46c2f4eb3860daa68887712c609ac77.tar.bz2 dotfiles-bsd-082f5a06a46c2f4eb3860daa68887712c609ac77.tar.xz dotfiles-bsd-082f5a06a46c2f4eb3860daa68887712c609ac77.tar.zst dotfiles-bsd-082f5a06a46c2f4eb3860daa68887712c609ac77.zip |
up
Diffstat (limited to '.local/bin/dmbook')
-rwxr-xr-x | .local/bin/dmbook | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/.local/bin/dmbook b/.local/bin/dmbook deleted file mode 100755 index 4aa8738..0000000 --- a/.local/bin/dmbook +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -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; - } - $choice =~ s/ /+/g; - $url = 'https://www.startpage.com/sp/search?q=' . $choice; - $pid = fork(); - if (not $pid) { - exec($prefix . BROWSER, $url); - } - return; -} - -main(); - -__END__ |