summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-12-27 09:29:30 +0100
committerJoe <rbo@gmx.us>2024-12-27 09:29:30 +0100
commit9846097e52eddfc99f8100da734b5a7922f33e24 (patch)
tree6a99a91571294f32c2818caf974ffe1c105bca37
parentup (diff)
downloaddotfiles-bsd-9846097e52eddfc99f8100da734b5a7922f33e24.tar.gz
dotfiles-bsd-9846097e52eddfc99f8100da734b5a7922f33e24.tar.bz2
dotfiles-bsd-9846097e52eddfc99f8100da734b5a7922f33e24.tar.xz
dotfiles-bsd-9846097e52eddfc99f8100da734b5a7922f33e24.tar.zst
dotfiles-bsd-9846097e52eddfc99f8100da734b5a7922f33e24.zip
bookmarks
-rwxr-xr-x.local/bin/dmbookm36
-rwxr-xr-x.local/bin/dmlog2
2 files changed, 24 insertions, 14 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;
}
diff --git a/.local/bin/dmlog b/.local/bin/dmlog
index acf373c..6410007 100755
--- a/.local/bin/dmlog
+++ b/.local/bin/dmlog
@@ -13,7 +13,7 @@ use constant {
SHUTDOWN_PATH => '/sbin/shutdown',
LOGINCTL_PATH => '/usr/bin/loginctl',
NOTIF_PATH => 'notify-send',
- HOSTNAME => (split /\./, hostname())
+ HOSTNAME => (split /\./, hostname())[0]
};
use constant LIST => [
'lock screen',