summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmbookm
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dmbookm')
-rwxr-xr-x.local/bin/dmbookm16
1 files changed, 14 insertions, 2 deletions
diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm
index 4aa8738..4b1332e 100755
--- a/.local/bin/dmbookm
+++ b/.local/bin/dmbookm
@@ -9,23 +9,35 @@ use constant {
HOSTNAME => (split /\./, hostname())
};
+use constant LIST => [
+ ['grafana', 'https://grafana.nuabee.fr/'],
+ ['graf', 'http://graf.joe.town/'],
+ ['hedgedoc', 'http://hedgedoc.int.ysosecure.com/'],
+ ['zammad', 'https://support.nuabee.fr/'],
+ [],
+ ];
+
sub main
{
my $choice;
my $url;
my $pid;
my $prefix;
+ my $list;
$prefix = '/usr';
if (HOSTNAME eq "mars") {
$prefix += '/local';
}
- $choice = `printf "" | dmenu -i -m 0 -p 'Search:'`;
+ for (@{+LIST}) {
+ $list .= $_ . "\n";
+ }
+ $choice = `printf "" | dmenu -i -m 0 -l 100`;
if (not $choice) {
return;
}
$choice =~ s/ /+/g;
- $url = 'https://www.startpage.com/sp/search?q=' . $choice;
+ $url = . $choice;
$pid = fork();
if (not $pid) {
exec($prefix . BROWSER, $url);