blob: af0c26dcd892df0ab2c1350b365c9f09a46fdb72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw/switch/;
use Data::Dump qw(dump);
use POSIX qw(setsid);
use Sys::Hostname qw(hostname);
use constant PROG_LIST => "" .
"Terminal" . "\n" .
"File manager" . "\n" .
"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" .
"Emacs-NoX" . "\n" .
"--- Graphics ---" . "\n" .
"GIMP - GNU Image Manipulation Program" . "\n" .
"Inkscape" . "\n" .
"--- Internet ---" . "\n" .
"LibreWolf" . "\n" .
"Firefox" . "\n" .
"Iridium" . "\n" .
"Chromium" . "\n" .
"Discord" . "\n" .
"Signal" . "\n" .
"Liferea" . "\n" .
"HexChat" . "\n" .
"--- Audio ---" . "\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" .
"Lutris" . "\n" .
"GZDoom" . "\n" .
"DOSBox" . "\n" .
"Mupen64Plus" . "\n" .
"Cemu" . "\n" .
"PCSX2" . "\n" .
"RPCS3";
use constant WORK_LIST => "" .
"--- Work ---" . "\n" .
"Remmina" . "\n" .
"Rclone Browser" . "\n" .
"Insomnia" . "\n" .
"VMware" . "\n" .
"MongoDB Compass" . "\n" .
"Miro" . "\n" .
"FortiClient VPN" . "\n" .
"Teams";
sub run
{
my ($action) = @_;
my $pid;
chomp($action);
$pid = fork();
exit if $pid;
setsid();
exec("alacritty") if $action =~ "Terminal";
exec("pcmanfm") if $action =~ "File manager";
exec("firefox") if $action =~ "Web browser";
exec("thunderbird") if $action =~ "Mail client";
exec("arduino-ide") if $action =~ "Arduino";
exec("cool-retro-term") if $action =~ "cool-retro-term";
exec("qalculate-gtk") if $action =~ "Qalculate!";
exec("kleopatra") if $action =~ "Kleopatra";
exec("transmission-gtk") if $action =~ "Transmission";
exec("doas", "wireshark") if $action =~ "Wireshark";
exec("mkvtoolnix-gui") if $action =~ "MKVToolNix";
exec("stellarium") if $action =~ "Stellarium";
exec("google-earth-pro") if $action =~ "Google Earth";
exec("alacritty", "-e", "nvim") if $action =~ "NeoVim";
exec("emacs") if $action =~ "Emacs";
exec("alacritty", "-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("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("ario") if $action =~ "Ario";
exec("kdenlive") if $action =~ "Kdenlive";
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;
}
sub main
{
my $action;
my $prompt;
my $color;
$color = '#cc241d';
if (@ARGV == 1) {
$color = $ARGV[0];
}
$prompt = PROG_LIST;
if (hostname() eq "po-rbo.ln.ysosecure.com") {
$prompt .= WORK_LIST;
}
$action = `dmenu -i -l 100 -sb '$color' -shb '$color' <<LIST
$prompt
LIST`;
if (not $action) {
return;
}
run($action);
return;
}
main();
__END__
|