-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_ncmpcpp.sh
executable file
·188 lines (103 loc) · 2.96 KB
/
script_ncmpcpp.sh
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#!/bin/bash
#variavel valor
t1='sleep 0.5'
opcao=$1
escolha(){
echo $opcao
case $opcao in
"-g") gentoo ;;
"--gentoo") gentoo ;;
"-v") void ;;
"--void") void ;;
"-a") arch ;;
"--arch") arch ;;
*) echo "Opção inválida! Use uma das seguintes opcoes:
-g,--gentoo Usa script para gentoo
-v,--void Usa script para void
-a,--arch Usa script para arch"
exit 1 ;;
esac
}
gentoo(){
echo -e "\033[41;1;37m>>>\033[0m instalação mpd"
$t1
sudo emerge -aq media-sound/mpd
$t1
echo -e "\033[41;1;37m>>>\033[0m instalação ncmpcpp e flags = clock curl outputs taglib unicode visualizer inotify"
$t1
sudo euse -E clock curl outputs taglib unicode visualizer
$t1
sudo emerge -aq media-sound/ncmpcpp
$t1
git clone https://github.com/quebravel/dotfiles-conf.git
$t1
cp -rv ~/dotfiles-conf/dunst ~/dotfiles-conf/mpd ~/dotfiles-conf/ncmpcpp ~/.config
$t1
touch ~/.config/mpd/socket
$t1
echo -e "\033[41;1;37m>>>\033[0m instalação mpc"
$t1
sudo emerge media-sound/mpc
$t1
echo -e "\033[41;1;37m>>>\033[0m instalação dunst"
$t1
sudo emerge x11-misc/dunst
$t1
echo -e "\033[41;1;37m>>>\033[0m adicionando ao iniciar/rc-update"
$t1
sudo rc-service mpd start
$t1
sudo rc-update add mpd default
$t1
export MPD_HOST=$HOME/.config/mpd/socket
mpd
$t1
echo 'dunst &\nexport MPD_HOST=$HOME/.config/mpd/socket\nmpd --kill;mpd &' >> ~/.xinitrc
echo 'Use esses comando para iniciar ou parar se \nrc-service mpd stop\nrc-service mpd start'
echo -e "\033[41;1;37m>>>\033[0m Pronto!"
}
void(){
sudo xbps-install -S mpd mpc ncmpcpp dunst
$t1
rm -r ~/.config/{mpd,ncmpcpp,dunst}
$t1
mkdir ~/.config/mpd
$t1
mkdir ~/.config/ncmpcpp
$t1
mkdir ~/Músicas
$t1
mkdir ~/.config/dunst
wget -P ~/.config/mpd https://raw.githubusercontent.com/quebravel/dotfiles-conf/master/.config/mpd/mpd.conf
$t1
wget -P ~/.config/ncmpcpp https://raw.githubusercontent.com/quebravel/dotfiles-conf/master/.config/ncmpcpp/config
$t1
wget -P ~/.config/dunst https://raw.githubusercontent.com/quebravel/dotfiles-conf/master/.config/dunst/dunstrc
$t1
sudo ln -s /etc/sv/mpd /var/service
$t1
sudo sv up mpd
$t1
sudo sv status mpd
$t1
touch ~/.config/mpd/socket
$t1
sed -i '3i\dunst &\nexport MPD_HOST=$HOME/.config/mpd/socket\nmpd --kill;mpd &' ~/.xinitrc
$t1
export MPD_HOST=$HOME/.config/mpd/socket
$t1
echo '>>> MPD NPC NCMPCPP e DUNST INSTALADOS'
echo '>>> ESPERE ALGUNS SEGUNDOS DEPOIS DE EXECUTAR O NCMPCPP PARA CARREGAR O SERVIDOR'
}
arch(){
[[ -d ~/Músicas ]] || mkdir ~/Músicas
sudo systemctl --user enable mpd.service
sudo systemctl --user start mpd.service
touch ~/.config/mpd/socket
sed -i 's/\# export MPD_HOST\=\$HOME\/.config\/mpd\/socket/export MPD_HOST\=\$HOME\/.config\/mpd\/socket/g' $HOME/.xinitrc
sed -i 's/# mpd --kill; mpd \&/mpd --kill; mpd \&/g' $HOME/.xinitrc
export MPD_HOST=$HOME/.config/mpd/socket
echo '>>> MPD NPC NCMPCPP INSTALADOS'
echo '>>> REINICIE O SISTEMA'
}
escolha