-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
hotdog-open:.pl
executable file
·119 lines (94 loc) · 1.89 KB
/
hotdog-open:.pl
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
#!/usr/bin/env perl
$path = shift @ARGV;
if (not $path) {
die('specify path');
}
if ($path =~ m/\.(vgm|vgz)$/i) {
system('vgmplay', $path);
exit 0;
}
if ($path =~ m/\.mp3$/i) {
system('ffplay', $path);
exit 0;
}
if ($path =~ m/\.m4a$/i) {
system('ffplay', $path);
exit 0;
}
if ($path =~ m/\.mp4$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.mp4\.part$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.m4v$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.mkv$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.avi$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.webm$/i) {
system('hotdog-handleVideoFile:.pl', $path);
exit 0;
}
if ($path =~ m/\.wav$/i) {
system('ffplay', $path);
exit 0;
}
if ($path =~ m/\.pdf$/i) {
system('mupdf', $path);
exit 0;
}
if ($path =~ m/\.html$/i) {
system('chromium', $path);
exit 0;
}
if ($path =~ m/\.mhtml$/i) {
system('chromium', $path);
exit 0;
}
if ($path =~ m/\.txt$/i) {
system('hotdog', 'stringFromFile', $path);
exit 0;
}
if ($path =~ m/\.csv$/i) {
#.csv,"parseCSVFile|asListInterface"
exit 0;
}
if ($path =~ m/\.jpg$/i) {
system('feh', $path);
exit 0;
}
if ($path =~ m/\.jpeg$/i) {
system('feh', $path);
exit 0;
}
if ($path =~ m/\.png$/i) {
system('feh', $path);
exit 0;
}
if ($path =~ m/\.xpm$/i) {
system('feh', $path);
exit 0;
}
if ($path =~ m/\.d64$/i) {
# system('x64', $path);
exit 0;
}
if ($path =~ m/\.(nes|smc|sfc|md|smd|sms|gb|bin|a26)$/i) {
system('hotdog', 'show', 'arg0|emulatorFromFile', $path);
exit 0;
}
if ($path =~ m/\.webp$/i) {
system('chromium', $path);
exit 0;
}
system('hotdog', 'alert', "Unknown file type for '$path'");