From 5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 26 Dec 2024 17:27:52 +0100 Subject: up --- .local/bin/dmbookm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to '.local/bin/dmbookm') 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); -- cgit v1.2.3