-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutil.cpp
61 lines (61 loc) · 1.05 KB
/
util.cpp
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
#include<iostream>
using namespace std;
int resetlaunchpad()
{
system("defaults write com.apple.dock ResetLaunchPad -bool true");
system("killall Dock");
return 1;
}
int setdarkmode()
{
system("defaults write -g NSRequiresAquaSystemAppearance -bool Yes");
system("Killall Finder");
return 1;
}
int redarkmode()
{
system("defaults write -g NSRequiresAquaSystemAppearance -bool No");
system("Killall Finder");
return 1;
}
int unkonwnsource()
{
system("sudo spctl --master-disable");
return 1;
}
void resetdockicon(){
system("defaults delete com.apple.dock;killall Dock");
}
int main()
{
cout<<"l: Reset Launchpad"<<endl;
cout<<"d: Use Old Dark Mode(Dark Dock Only)"<<endl;
cout<<"D: Recover Mojave Dark Mode"<<endl;
cout<<"a: Allow apps downloaded from anywhere"<<endl;
cout<<"q: quit the programe"<<endl;
char input;
while(1)
{
cin>>input;
if(input=='l')
{
resetlaunchpad();
}
if(input=='d')
{
setdarkmode();
}
if(input=='D')
{
redarkmode();
}
if(input=='a')
{
unkonwnsource();
}
if(input=='q')
{
return 0;
}
}
}