-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.pl
56 lines (46 loc) · 1009 Bytes
/
script.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
#!/usr/bin/perl
use Language;
%txt = %Language::pt_br;
sub notify {
print "NOTIFICATION:@_[0]\n";
}
sub actionShow {
system("defaults write com.apple.finder AppleShowAllFiles -bool true");
system("killall Finder");
notify("$txt{msgshow}");
}
sub actionHide {
system("defaults write com.apple.finder AppleShowAllFiles -bool false");
system("killall Finder");
notify("$txt{msghide}");
}
sub actionAbout {
print "ALERT:Montri|$txt{msgabout}\n";
}
sub actionPage {
system("open https://github.com/ArturGuedes/Montri");
}
if (!scalar(@ARGV)) {
print "$txt{show}\n";
print "$txt{hide}\n";
print "----\n";
print "SUBMENU|$txt{help}|$txt{about}|$txt{page}\n";
} else {
sub get {
if($ARGV[0] eq "$txt{@_[0]}"){
return 1;
}
}
if(get("show")){
actionShow;
}
if(get("hide")){
actionHide;
}
if(get("about")){
actionAbout;
}
if(get("page")){
actionPage;
}
}