diff options
Diffstat (limited to '.local/bin/dmapps')
| -rwxr-xr-x | .local/bin/dmapps | 219 | 
1 files changed, 54 insertions, 165 deletions
| diff --git a/.local/bin/dmapps b/.local/bin/dmapps index 51b0625..e5f9dab 100755 --- a/.local/bin/dmapps +++ b/.local/bin/dmapps @@ -2,9 +2,9 @@  use strict;  use warnings; +use feature qw/switch/;  use Data::Dump qw(dump);  use POSIX qw(setsid); -use Switch;  use Sys::Hostname qw(hostname);  use constant PROG_LIST	=> "" . @@ -13,16 +13,12 @@ use constant PROG_LIST	=> "" .  "Web browser"				. "\n" .  "Mail client"				. "\n" .  "--- Accessories ---"		. "\n" . -"Arduino"					. "\n" .  "cool-retro-term"			. "\n" . -"Qalculate!"				. "\n" . -"Kleopatra"					. "\n" . -"Transmission"				. "\n" . -"Wireshark"					. "\n" .  "MKVToolNix"				. "\n" .  "Stellarium"				. "\n" .  "Google Earth"				. "\n" .  "DBeaver"					. "\n" . +"OnlyOffice"				. "\n" .  "--- Editors ---"			. "\n" .  "NeoVim"					. "\n" .  "Emacs"						. "\n" . @@ -40,13 +36,12 @@ use constant PROG_LIST	=> "" .  "Liferea"					. "\n" .  "HexChat"					. "\n" .  "--- Audio ---"				. "\n" . +"Ardour"					. "\n" .  "REAPER"					. "\n" .  "Audacity"					. "\n" .  "Pulse Control Panel"		. "\n" .  "JACK Audio Connection Kit"	. "\n" .  "--- Multimedia ---"		. "\n" . -"Ario"						. "\n" . -"Kdenlive"					. "\n" .  "OBS Studio"				. "\n" .  "--- Games ---"				. "\n" .  "Steam"						. "\n" . @@ -75,163 +70,53 @@ sub run  	chomp($action);  	$pid = fork(); -	exit if $pid; +	return if $pid;  	setsid(); -	switch ($action) { -		case "Terminal" { -			exec("alacritty"); -		} -		case "File manager" { -			exec("pcmanfm"); -		} -		case "Web browser" { -			exec("firefox"); -		} -		case "Mail client" { -			exec("thunderbird"); -		} -		case "Arduino" { -			exec("arduino-ide"); -		} -		case "cool-retro-term" { -			exec("cool-retro-term"); -		} -		case "Qalculate!" { -			exec("qalculate-gtk"); -		} -		case "Kleopatra" { -			exec("kleopatra"); -		} -		case "Transmission" { -			exec("transmission-gtk"); -		} -		case "Wireshark" { -			exec("doas", "wireshark"); -		} -		case "MKVToolNix" { -			exec("mkvtoolnix-gui"); -		} -		case "Stellarium" { -			exec("stellarium"); -		} -		case "Google Earth" { -			exec("google-earth-pro"); -		} -		case "NeoVim" { -			exec("alacritty", "-e", "nvim"); -		} -		case "Emacs" { -			exec("emacs"); -		} -		case "Emacs-NoX" { -			exec("alacritty", "-e", "emacs-nw"); -		} -		case "GIMP - GNU Image Manipulation Program" { -			exec("gimp"); -		} -		case "Inkscape" { -			exec("inkscape"); -		} -		case "LibreWolf" { -			exec("librewolf"); -		} -		case "Firefox" { -			exec("firefox"); -		} -		case "Iridium" { -			exec("iridium", "--force-dark-mode"); -		} -		case "Chromium" { -			exec("chromium"); -		} -		case "Discord" { -			exec("discord"); -		} -		case "Signal" { -			exec("signal-desktop"); -		} -		case "Liferea" { -			exec("liferea"); -		} -		case "HexChat" { -			exec("hexchat"); -		} -		case "REAPER" { -			exec("reaper"); -		} -		case "Audacity" { -			exec("audacity"); -		} -		case "Pulse Control Panel" { -			exec("pavucontrol"); -		} -		case "JACK Audio Connection Kit" { -			exec("qjackctl"); -		} -		case "Ario" { -			exec("ario"); -		} -		case "Kdenlive" { -			exec("kdenlive"); -		} -		case "OBS Studio" { -			exec("obs"); -		} -		case "Steam" { -			exec("steam"); -		} -		case "Lutris" { -			exec("lutris"); -		} -		case "GZDoom" { -			exec("gzdoom"); -		} -		case "DOSBox" { -			exec("dosbox"); -		} -		case "Mupen64Plus" { -			exec("mupen64plus-qt"); -		} -		case "Cemu" { -			exec("cemu"); -		} -		case "PCSX2" { -			exec("pcsx2"); -		} -		case "RPCS3" { -			exec("rpcs3"); -		} -		case "Remmina" { -			exec("remmina"); -		} -		case "Rclone Browser" { -			exec("rclone-browser"); -		} -		case "Insomnia" { -			exec("insomnia"); -		} -		case "VMware" { -			exec("vmware"); -		} -		case "DBeaver" { -			exec("dbeaver"); -		} -		case "MongoDB Compass" { -			exec("nixGL", "mongodb-compass"); -		} -		case "Miro" { -			exec("miro"); -		} -		case "FortiClient VPN" { -			exec("/opt/forticlient/gui/FortiClient-linux-x64/FortiClient"); -		} -		case "Teams" { -			exec("nixGL", "teams-for-linux"); -		} -		else { -			return; -		} -	} +	exec("st") if $action =~ "Terminal"; +	exec("st", "-e", "nnn") if $action =~ "File manager"; +	exec("firefox") if $action =~ "Web browser"; +	exec("st", "-e", "neomutt") if $action =~ "Mail client"; +	exec("cool-retro-term") if $action =~ "cool-retro-term"; +	exec("mkvtoolnix-gui") if $action =~ "MKVToolNix"; +	exec("stellarium") if $action =~ "Stellarium"; +	exec("google-earth-pro") if $action =~ "Google Earth"; +	exec("st", "-e", "nvim") if $action =~ "NeoVim"; +	exec("emacs") if $action =~ "Emacs"; +	exec("st", "-e", "emacs-nw") if $action =~ "Emacs-NoX"; +	exec("gimp") if $action =~ "GIMP - GNU Image Manipulation Program"; +	exec("inkscape") if $action =~ "Inkscape"; +	exec("librewolf") if $action =~ "LibreWolf"; +	exec("firefox") if $action =~ "Firefox"; +	exec("iridium", "--force-dark-mode") if $action =~ "Iridium"; +	exec("chromium") if $action =~ "Chromium"; +	exec("discord") if $action =~ "Discord"; +	exec("signal-desktop") if $action =~ "Signal"; +	exec("liferea") if $action =~ "Liferea"; +	exec("hexchat") if $action =~ "HexChat"; +	exec("ardour8") if $action =~ "Ardour"; +	exec("reaper") if $action =~ "REAPER"; +	exec("audacity") if $action =~ "Audacity"; +	exec("pavucontrol") if $action =~ "Pulse Control Panel"; +	exec("qjackctl") if $action =~ "JACK Audio Connection Kit"; +	exec("obs") if $action =~ "OBS Studio"; +	exec("steam") if $action =~ "Steam"; +	exec("lutris") if $action =~ "Lutris"; +	exec("gzdoom") if $action =~ "GZDoom"; +	exec("dosbox") if $action =~ "DOSBox"; +	exec("mupen64plus-qt") if $action =~ "Mupen64Plus"; +	exec("cemu") if $action =~ "Cemu"; +	exec("pcsx2") if $action =~ "PCSX2"; +	exec("rpcs3") if $action =~ "RPCS3"; +	exec("remmina") if $action =~ "Remmina"; +	exec("rclone-browser") if $action =~ "Rclone Browser"; +	exec("insomnia") if $action =~ "Insomnia"; +	exec("vmware") if $action =~ "VMware"; +	exec("dbeaver") if $action =~ "DBeaver"; +	exec("onlyoffice-desktopeditors") if $action =~ "OnlyOffice"; +	exec("nixGL", "mongodb-compass") if $action =~ "MongoDB Compass"; +	exec("miro") if $action =~ "Miro"; +	exec("/opt/forticlient/gui/FortiClient-linux-x64/FortiClient") if $action =~ "FortiClient VPN"; +	exec("nixGL", "teams-for-linux") if $action =~ "Teams";  	return;  } @@ -249,7 +134,11 @@ sub main  	if (hostname() eq "po-rbo.ln.ysosecure.com") {  		$prompt .= WORK_LIST;  	} -	$action = `dmenu -i -l 100 -sb '$color' -shb '$color' <<LIST +	my $menu = "dmenu -sb '$color' -shb '$color'"; +	if (defined $ENV{WAYLAND_DISPLAY}) { +		$menu = "wmenu -S '$color'"; +	} +	$action = `$menu -i -l 100 <<LIST  $prompt  LIST`;  	if (not $action) { | 
