-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathneo.py
117 lines (103 loc) · 3.71 KB
/
neo.py
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
from os import system
print(
"""
┳┓ ┏┓ ┏┓ ┓┏ ┳ ┳┳┓
┃┃ ┣ ┃┃ ┃┃ ┃ ┃┃┃
┛┗ ┗┛ ┗┛ ┗┛ ┻ ┛ ┗
| Manage your config |
----------------------
Select a option: (write a number and press enter)
1. Install
2. Update
3. Uninstall
4. Reinstall
Press enter to exit
"""
)
selection = input("")
if selection == "1":
system("git clone https://github.com/Mathiew82/lazyvim-config.git ~/.config/nvim")
print("\N{heavy check mark} Installation was successful!")
elif selection == "2":
try:
if system("sudo rm -r ~/.config/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.config/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.config/nvim folder...")
except Exception as e:
print(e)
system("git clone https://github.com/Mathiew82/lazyvim-config.git ~/.config/nvim")
print("\N{heavy check mark} Update was successful!")
elif selection == "3":
try:
if system("sudo rm -r ~/.config/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.config/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.config/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.local/share/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.local/share/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.local/share/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.local/state/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.local/state/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.local/state/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.cache/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.cache/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.cache/nvim folder...")
except Exception as e:
print(e)
print("\N{heavy check mark} Uninstall was successful!")
elif selection == "4":
try:
if system("sudo rm -r ~/.config/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.config/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.config/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.local/share/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.local/share/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.local/share/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.local/state/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.local/state/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.local/state/nvim folder...")
except Exception as e:
print(e)
try:
if system("sudo rm -r ~/.cache/nvim") != 0:
raise Exception(
"\N{heavy multiplication x} ~/.cache/nvim folder does not exist"
)
print("\N{heavy check mark} Deleted ~/.cache/nvim folder...")
except Exception as e:
print(e)
system("git clone https://github.com/Mathiew82/lazyvim-config.git ~/.config/nvim")
print("\N{heavy check mark} Uninstall and installation was successful!")
#
#
#