diff options
author | Joe <rbo@gmx.us> | 2024-12-26 17:27:52 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-26 17:27:52 +0100 |
commit | 5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de (patch) | |
tree | b012c7fe49af4db703d7dc5672991a5254d00261 /.local/bin/dmbookm | |
parent | up (diff) | |
download | dotfiles-bsd-5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de.tar.gz dotfiles-bsd-5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de.tar.bz2 dotfiles-bsd-5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de.tar.xz dotfiles-bsd-5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de.tar.zst dotfiles-bsd-5cf9ed79cf0d019f4ec1d50a04415710c8f6f3de.zip |
up
Diffstat (limited to '.local/bin/dmbookm')
-rwxr-xr-x | .local/bin/dmbookm | 16 |
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); |