diff options
author | Joe <rrbo@proton.me> | 2023-06-19 14:08:15 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-06-19 14:08:15 +0200 |
commit | 20e7cba41d0355af958be3f716a8b5047e91cd88 (patch) | |
tree | a0e71f3d2591e445c4c9007a992724f228c263ab /.local/bin/dmapps | |
parent | up (diff) | |
download | dotfiles-bsd-20e7cba41d0355af958be3f716a8b5047e91cd88.tar.gz dotfiles-bsd-20e7cba41d0355af958be3f716a8b5047e91cd88.tar.bz2 dotfiles-bsd-20e7cba41d0355af958be3f716a8b5047e91cd88.tar.xz dotfiles-bsd-20e7cba41d0355af958be3f716a8b5047e91cd88.tar.zst dotfiles-bsd-20e7cba41d0355af958be3f716a8b5047e91cd88.zip |
up
Diffstat (limited to '.local/bin/dmapps')
-rwxr-xr-x | .local/bin/dmapps | 68 |
1 files changed, 65 insertions, 3 deletions
diff --git a/.local/bin/dmapps b/.local/bin/dmapps index b8cc3b4..2e210b7 100755 --- a/.local/bin/dmapps +++ b/.local/bin/dmapps @@ -3,19 +3,33 @@ use strict; use warnings; use Data::Dump qw(dump); +use Env qw(TERMINAL); use POSIX qw(setsid); -use Sys::Hostname; +use Sys::Hostname qw(hostname); use constant PROG_LIST => "" . "Terminal" . "\n" . "File manager" . "\n" . "Web browser" . "\n" . +"Mail client" . "\n" . "--- Accessories ---" . "\n" . "Qalculate!" . "\n" . "Kleopatra" . "\n" . "Transmission" . "\n" . "Wireshark" . "\n" . -"MKVToolNix" . "\n"; +"MKVToolNix" . "\n" . +"Google Earth" . "\n" . +"--- Editors ---" . "\n" . +"NeoVim" . "\n" . +"Emacs" . "\n" . +"Emacs-NoX" . "\n" . +"" ; +use constant WORK_LIST => "" . +"--- Work ---" . "\n" . +"Remmina" . "\n" . +"Insomnia" . "\n" . +"VMware" . "\n" . +"miro" . "\n"; sub run { @@ -44,6 +58,13 @@ sub run setsid(); exec("librewolf"); } + # Mail client + elsif ($action eq "Mail client") { + $pid = fork(); + exit if $pid; + setsid(); + exec("thunderbird"); + } # --- Accessories --- # Qalculate! elsif ($action eq "Qalculate!") { @@ -73,6 +94,42 @@ sub run setsid(); exec("doas", "wireshark"); } + # MKVToolNix + elsif ($action eq "MKVToolNix") { + $pid = fork(); + exit if $pid; + setsid(); + exec("mkvtoolnix-gui"); + } + # Google Earth + elsif ($action eq "Google Earth") { + $pid = fork(); + exit if $pid; + setsid(); + exec("google-earth-pro"); + } + # --- Editors --- + # NeoVim + elsif ($action eq "NeoVim") { + $pid = fork(); + exit if $pid; + setsid(); + exec("alacritty", "-e", "nvim"); + } + # Emacs + elsif ($action eq "Emacs") { + $pid = fork(); + exit if $pid; + setsid(); + exec("emacs"); + } + # Emacs-NoX + elsif ($action eq "Emacs-NoX") { + $pid = fork(); + exit if $pid; + setsid(); + exec("alacritty", "-e", "emacs-nw"); + } return; } @@ -82,7 +139,12 @@ sub main my $prompt; $prompt = PROG_LIST; - $action = `printf "$prompt" | dmenu -i -l 25 -m 0`; + if (hostname() eq "po-rbo.ln.ysosecure.com") { + $prompt .= WORK_LIST; + } + $action = `dmenu -i -l 25 -m 0 <<LIST +$prompt +LIST`; if (not $action) { return; } |