summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmbookm
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dmbookm')
-rwxr-xr-x.local/bin/dmbookm36
1 files changed, 23 insertions, 13 deletions
diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm
index 4b1332e..0fcd023 100755
--- a/.local/bin/dmbookm
+++ b/.local/bin/dmbookm
@@ -4,18 +4,29 @@ use strict;
use warnings;
use Sys::Hostname;
+# debug
+use Data::Dumper;
+
use constant {
BROWSER => '/bin/firefox',
- HOSTNAME => (split /\./, hostname())
+ HOSTNAME => (split /\./, hostname())[0]
};
-use constant LIST => [
- ['grafana', 'https://grafana.nuabee.fr/'],
- ['graf', 'http://graf.joe.town/'],
- ['hedgedoc', 'http://hedgedoc.int.ysosecure.com/'],
- ['zammad', 'https://support.nuabee.fr/'],
- [],
- ];
+use constant LIST => {
+ graf => 'http://graf.joe.town/',
+ zhinu => 'https://zhinu.jozan.org/',
+ nua_grafana => 'https://grafana.nuabee.fr/',
+ nua_gr_linux_servers => 'https://grafana.nuabee.fr/d/xfpJB9FGz/linux-servers',
+ nua_gr_restops => 'https://grafana.nuabee.fr/d/Mz11bd07k/vue-d-ensemble-machines-atelier',
+ nua_git => 'https://gitlab.int.ysosecure.com/',
+ nua_mbs => 'https://mbs.nuabee.com/',
+ nua_hedgedoc => 'http://hedgedoc.int.ysosecure.com/',
+ nua_doc => 'https://doc.int.ysosecure.com/',
+ nua_kb => 'https://kb.int.ysosecure.com/',
+ nua_zammad => 'https://support.nuabee.fr/',
+ nua_atlas => 'https://atlas.nuabee.fr/',
+ nua_share => 'https://share.nuabee.fr/',
+};
sub main
{
@@ -29,18 +40,17 @@ sub main
if (HOSTNAME eq "mars") {
$prefix += '/local';
}
- for (@{+LIST}) {
+ for (keys %{LIST()}) {
$list .= $_ . "\n";
}
- $choice = `printf "" | dmenu -i -m 0 -l 100`;
+ $choice = `printf "$list" | dmenu -i -m 0 -l 100`;
if (not $choice) {
return;
}
- $choice =~ s/ /+/g;
- $url = . $choice;
+ chomp $choice;
$pid = fork();
if (not $pid) {
- exec($prefix . BROWSER, $url);
+ exec($prefix . BROWSER, LIST->{$choice});
}
return;
}