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 | |
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')
-rwxr-xr-x | .local/bin/dmbookm | 16 | ||||
-rwxr-xr-x | .local/bin/dmkill | 6 | ||||
-rwxr-xr-x | .local/bin/dmlog | 6 | ||||
-rwxr-xr-x | .local/bin/dmscrot | 12 | ||||
-rwxr-xr-x | .local/bin/dmsearch | 2 |
5 files changed, 27 insertions, 15 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); diff --git a/.local/bin/dmkill b/.local/bin/dmkill index 9c7c838..c022490 100755 --- a/.local/bin/dmkill +++ b/.local/bin/dmkill @@ -5,8 +5,8 @@ use warnings; use File::HomeDir qw(home); use constant KILL_PATH => '/bin/kill'; use constant CONFIRM => [ - "No", - "Yes" + "no", + "yes" ]; sub confirm @@ -18,7 +18,7 @@ sub confirm for (@{+CONFIRM}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu -i -p "Kill $proc ($pid)?" -l 2 -m 0`; + $choice = `printf "%s" "$list" | dmenu -i -p "kill $proc ($pid)?" -l 2 -m 0`; chomp $choice; if ($choice eq ${+CONFIRM}[1]) { return (1); diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 8d70ca5..acf373c 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -64,7 +64,7 @@ sub action '-u', 'normal', 'shutdown', - ' G\'night, partner!' + ' g\'night, partner!' ); sleep 2; if (HOSTNAME eq 'mother') { @@ -97,7 +97,7 @@ sub action '-u', 'normal', 'shutdown', - ' Rebootin\', partner!' + ' rebootin\', partner!' ); exec(SHUTDOWN_PATH, '-r', 'now'); } @@ -109,7 +109,7 @@ sub action '-u', 'normal', 'shutdown', - ' Farewell, partner!' + ' farewell, partner!' ); sleep 2; if (HOSTNAME eq 'mother') { diff --git a/.local/bin/dmscrot b/.local/bin/dmscrot index 78a02de..7456fa9 100755 --- a/.local/bin/dmscrot +++ b/.local/bin/dmscrot @@ -11,11 +11,11 @@ use constant { NOTIFY_PATH => 'notify-send' }; use constant LIST => [ - 'Select region', - 'Window', - 'Fullscreen', - 'Monitor 1', - 'Monitor 2' + 'select region', + 'window', + 'fullscreen', + 'monitor 1', + 'monitor 2' ]; sub show_img @@ -39,7 +39,7 @@ sub notify_img '-u', 'low', '-t', '2000', 'scrot', - ' Screenshot captured to ' . "\n" . + ' screenshot captured to ' . "\n" . '<b>' . $file . '</b>' ); return; diff --git a/.local/bin/dmsearch b/.local/bin/dmsearch index 4aa8738..97a8563 100755 --- a/.local/bin/dmsearch +++ b/.local/bin/dmsearch @@ -20,7 +20,7 @@ sub main if (HOSTNAME eq "mars") { $prefix += '/local'; } - $choice = `printf "" | dmenu -i -m 0 -p 'Search:'`; + $choice = `printf "" | dmenu -i -m 0 -p 'search:'`; if (not $choice) { return; } |