blob: a32a98c0aabb26e53b2d463f771829727716e210 [file] [log] [blame]
helmuthdub4b223b2012-01-13 09:54:30 -02001#!/bin/bash
2#-------------------------------------------------------------------------------
3#Created by helmuthdu mailto: helmuthdu[at]gmail[dot]com
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -02004#Contribution: flexiondotorg
helmuthdub4b223b2012-01-13 09:54:30 -02005#-------------------------------------------------------------------------------
6#This program is free software: you can redistribute it and/or modify
7#it under the terms of the GNU General Public License as published by
8#the Free Software Foundation, either version 3 of the License, or
9#(at your option) any later version.
10#
11#This program is distributed in the hope that it will be useful,
12#but WITHOUT ANY WARRANTY; without even the implied warranty of
13#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14#GNU General Public License for more details.
15#
16#You should have received a copy of the GNU General Public License
17#along with this program. If not, see <http://www.gnu.org/licenses/>.
18#-------------------------------------------------------------------------------
19# Run this script after your first boot with archlinux (as root)
20
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030021if [[ -f `pwd`/sharedfuncs ]]; then
22 source sharedfuncs
23else
24 echo "missing file: sharedfuncs"
25 exit 1
26fi
27
28#ARCHLINUX ULTIMATE INSTALL {{{
29#WELCOME {{{
30welcome(){
31 clear
Helmuth Saatkamp6539d952013-04-29 22:34:09 -030032 echo -e "${Bold}Welcome to the Archlinux Ultimate install script by helmuthdu${White}"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030033 print_line
34 echo "Requirements:"
35 echo "-> Archlinux installation"
36 echo "-> Run script as root user"
37 echo "-> Working internet connection"
38 print_line
39 echo "Script can be cancelled at any time with CTRL+C"
40 print_line
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030041 echo "http://www.github.com/helmuthdu/aui"
42 print_line
43 echo -e "\nBackups:"
44 print_line
45 # backup old configs
46 [[ ! -f /etc/pacman.conf.aui ]] && cp -v /etc/pacman.conf /etc/pacman.conf.aui || echo "/etc/pacman.conf.aui";
47 [[ -f /etc/ssh/sshd_config.aui ]] && echo "/etc/ssh/sshd_conf.aui";
48 [[ -f /etc/sudoers.aui ]] && echo "/etc/sudoers.aui";
49 pause_function
50 echo ""
51}
Helmuth Saatkamp4f729c32012-05-14 18:31:57 -030052#}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030053#LOCALE SELECTOR {{{
54language_selector(){
55 #AUTOMATICALLY DETECTS THE SYSTEM LOCALE {{{
56 #automatically detects the system language based on your locale
57 LOCALE=`locale | grep LANG | sed 's/LANG=//' | cut -c1-5`
58 #KDE #{{{
59 if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
60 LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
61 elif [[ $LOCALE == en_US ]]; then
62 LOCALE_KDE="en_gb"
63 else
64 LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
65 fi
66 #}}}
67 #FIREFOX #{{{
Helmuth Saatkampaf12dfe2013-05-27 10:11:01 -030068 if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == es_AR || $LOCALE == es_CL || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030069 LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030070 else
71 LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
72 fi
73 #}}}
Helmuth Saatkampaf12dfe2013-05-27 10:11:01 -030074 #THUNDERBIRD #{{{
75 if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
76 LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
77 elif [[ $LOCALE == es_CL ]]; then
78 LOCALE_TB="es-es"
79 else
80 LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
81 fi
82 #}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -030083 #HUNSPELL #{{{
84 if [[ $LOCALE == pt_BR ]]; then
85 LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
86 elif [[ $LOCALE == pt_PT ]]; then
87 LOCALE_HS="pt_pt"
88 else
89 LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
90 fi
91 #}}}
92 #ASPELL #{{{
93 LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
94 #}}}
95 #LIBREOFFICE #{{{
96 if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
97 LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
98 else
99 LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
100 fi
101 #}}}
102 #}}}
103 print_title "LOCALE - https://wiki.archlinux.org/index.php/Locale"
104 print_info "Locales are used in Linux to define which language the user uses. As the locales define the character sets being used as well, setting up the correct locale is especially important if the language contains non-ASCII characters."
105 read -p "Default system language: \"$LOCALE\" [Y/n]: " OPTION
106 case "$OPTION" in
107 "n")
108 while [[ $OPTION != y ]]; do
109 setlocale
110 read_input_text "Confirm locale ($LOCALE)"
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -0200111 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300112 sed -i '/'${LOCALE}'/s/^#//' /etc/locale.gen
113 locale-gen
114 localectl set-locale LANG=${LOCALE_UTF8}
115 #KDE #{{{
116 if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
117 LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
118 elif [[ $LOCALE == en_US ]]; then
119 LOCALE_KDE="en_gb"
Helmuth Saatkamp2f95b9e2013-03-24 09:25:09 -0300120 else
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300121 LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
Helmuth Saatkamp2f95b9e2013-03-24 09:25:09 -0300122 fi
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300123 #}}}
124 #FIREFOX #{{{
Helmuth Saatkampaf12dfe2013-05-27 10:11:01 -0300125 if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == es_AR || $LOCALE == es_CL || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300126 LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300127 else
128 LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
129 fi
130 #}}}
Helmuth Saatkampaf12dfe2013-05-27 10:11:01 -0300131 #THUNDERBIRD #{{{
132 if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
133 LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
134 elif [[ $LOCALE == es_CL ]]; then
135 LOCALE_TB="es-es"
136 else
137 LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
138 fi
139 #}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300140 #HUNSPELL #{{{
141 if [[ $LOCALE == pt_BR ]]; then
142 LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
143 elif [[ $LOCALE == pt_PT ]]; then
144 LOCALE_HS="pt_pt"
145 else
146 LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
147 fi
148 #}}}
149 #ASPELL #{{{
150 LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
151 #}}}
152 #LIBREOFFICE #{{{
153 if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
154 LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
155 else
156 LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
157 fi
158 #}}}
159 ;;
160 *)
161 ;;
162 esac
163}
164#}}}
165#SELECT/CREATE USER {{{
166select_user(){
167 #CREATE NEW USER {{{
168 create_new_user(){
169 read -p "Username: " USER_NAME
170 useradd -m -g users -G wheel -s /bin/bash ${USER_NAME}
171 chfn ${USER_NAME}
172 passwd ${USER_NAME}
173 pause_function
174 configure_user_account
175 }
176 #}}}
177 #CONFIGURE USER ACCOUNT {{{
178 configure_user_account(){
179 #BASHRC {{{
180 print_title "BASHRC - https://wiki.archlinux.org/index.php/Bashrc"
181 bashrc_list=("Default" "Vanilla" "Get from github");
182 PS3="$prompt1"
183 echo -e "Choose your .bashrc\n"
184 select OPT in "${bashrc_list[@]}"; do
185 case "$REPLY" in
186 1)
187 package_install "git"
188 git clone https://github.com/helmuthdu/dotfiles
189 cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc ~/
190 cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc /home/${USER_NAME}/
191 rm -fr dotfiles
192 ;;
193 2)
194 cp /etc/skel/.bashrc /home/${USER_NAME}
195 ;;
196 3)
197 package_install "git"
198 read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
199 read -p "Enter your github repository [ex: aui]: " GITHUB_REPO
200 git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
201 cp -R $GITHUB_REPO/.* /home/${USER_NAME}/
202 rm -fr $GITHUB_REPO
203 ;;
204 *)
205 invalid_option
206 ;;
207 esac
Helmuth Saatkamp2f95b9e2013-03-24 09:25:09 -0300208 [[ -n $OPT ]] && break
209 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300210 #}}}
211 #EDITOR {{{
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200212 print_title "DEFAULT EDITOR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300213 editors_list=("emacs" "joe" "nano" "vi" "vim" "zile");
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200214 PS3="$prompt1"
Helmuth Saatkamp2d4664f2012-12-05 00:11:32 -0200215 echo -e "Select editor\n"
216 select EDITOR in "${editors_list[@]}"; do
217 if contains_element "$EDITOR" "${editors_list[@]}"; then
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300218 if [[ $EDITOR == joe ]]; then
219 ! is_package_installed "joe" && aui_download_packages "joe"
220 elif [[ $EDITOR == vim ]]; then
221 ! is_package_installed "gvim" && package_install "vim ctags"
222 #VIMRC {{{
Helmuth6633a432013-08-20 15:07:18 -0300223 if [[ ! -f /home/${USER_NAME}/.vimrc ]]; then
Helmuth66bff552013-07-17 13:33:47 -0300224 vimrc_list=("Default" "Vanilla" "Get from github");
225 PS3="$prompt1"
226 echo -e "Choose your .vimrc\n"
227 select OPT in "${vimrc_list[@]}"; do
228 case "$REPLY" in
229 1)
230 package_install "git"
231 git clone https://github.com/helmuthdu/vim
232 mv vim /home/${USER_NAME}/.vim
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300233 ln -sf /home/${USER_NAME}/.vim/vimrc /home/${USER_NAME}/.vimrc
Helmuth66bff552013-07-17 13:33:47 -0300234 cp -R vim /home/${USER_NAME}/.vim/fonts /home/${USER_NAME}/.fonts
Helmuth66bff552013-07-17 13:33:47 -0300235 ;;
236 3)
237 package_install "git"
238 read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
239 read -p "Enter your github repository [ex: vim]: " GITHUB_REPO
240 git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
241 cp -R $GITHUB_REPO/.vim /home/${USER_NAME}/
242 if [[ -f $GITHUB_REPO/vimrc ]]; then
243 ln -sf /home/${USER_NAME}/.vim/vimrc /home/${USER_NAME}/.vimrc
244 else
245 ln -sf /home/${USER_NAME}/.vim/.vimrc /home/${USER_NAME}/.vimrc
246 fi
247 rm -fr $GITHUB_REPO
Helmuthe3e254a2013-10-09 10:35:03 -0300248 ;;
249 2)
250 echo "Nothing to do..."
Helmuth66bff552013-07-17 13:33:47 -0300251 ;;
252 *)
253 invalid_option
254 ;;
255 esac
Helmuthe3e254a2013-10-09 10:35:03 -0300256 [[ -n $OPT ]] && break
Helmuth66bff552013-07-17 13:33:47 -0300257 done
258 fi
Helmuth Saatkamp8f21d8a2012-11-23 22:02:11 -0200259 #}}}
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200260 else
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300261 package_install "$EDITOR"
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200262 fi
Helmuthe3e254a2013-10-09 10:35:03 -0300263 break
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300264 else
265 invalid_option
266 fi
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200267 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300268 #}}}
269 chown -R ${USER_NAME}:users /home/${USER_NAME}
270 }
271 #}}}
272 print_title "SELECT/CREATE USER ACCOUNT - https://wiki.archlinux.org/index.php/Users_and_Groups"
273 users_list=(`cat /etc/passwd | grep "/home" | cut -d: -f1`);
274 PS3="$prompt1"
275 echo "Avaliable Users:"
276 if [[ $(( ${#users_list[@]} )) -gt 0 ]]; then
277 print_warning "WARNING: THE SELECTED USER MUST HAVE SUDO PRIVILEGES"
278 else
279 echo ""
280 fi
281 select OPT in "${users_list[@]}" "Create new user"; do
282 if [[ $OPT == "Create new user" ]]; then
283 create_new_user
284 elif contains_element "$OPT" "${users_list[@]}"; then
285 USER_NAME=$OPT
286 else
287 invalid_option
288 fi
289 [[ -n $OPT ]] && break
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200290 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300291 [[ ! -f /home/${USER_NAME}/.bashrc ]] && configure_user_account;
292}
293#}}}
294#CONFIGURE SUDO {{{
295configure_sudo(){
296 if ! is_package_installed "sudo" ; then
297 print_title "SUDO - https://wiki.archlinux.org/index.php/Sudo"
298 package_install "sudo"
299 fi
300 #CONFIGURE SUDOERS {{{
301 if [[ ! -f /etc/sudoers.aui ]]; then
302 cp -v /etc/sudoers /etc/sudoers.aui
303 ## Uncomment to allow members of group wheel to execute any command
304 sed -i '/%wheel ALL=(ALL) ALL/s/^#//' /etc/sudoers
305 ## Same thing without a password (not secure)
306 #sed -i '/%wheel ALL=(ALL) NOPASSWD: ALL/s/^#//' /etc/sudoers
307
308 #This config is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:
309 echo "" >> /etc/sudoers
310 echo 'Defaults !requiretty, !tty_tickets, !umask' >> /etc/sudoers
311 echo 'Defaults visiblepw, path_info, insults, lecture=always' >> /etc/sudoers
312 echo 'Defaults loglinelen=0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth' >> /etc/sudoers
313 echo 'Defaults passwd_tries=3, passwd_timeout=1' >> /etc/sudoers
314 echo 'Defaults env_reset, always_set_home, set_home, set_logname' >> /etc/sudoers
315 echo 'Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"' >> /etc/sudoers
316 echo 'Defaults timestamp_timeout=300' >> /etc/sudoers
317 echo 'Defaults passprompt="[sudo] password for %u: "' >> /etc/sudoers
318 fi
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200319 #}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300320}
321#}}}
322#AUR HELPER {{{
323choose_aurhelper(){
324 print_title "AUR HELPER - https://wiki.archlinux.org/index.php/AUR_Helpers"
325 print_info "AUR Helpers are written to make using the Arch User Repository more comfortable."
326 print_warning "\tNone of these tools are officially supported by Arch devs."
327 aurhelper=("Yaourt" "Packer" "Pacaur")
328 PS3="$prompt1"
329 echo -e "Choose your default AUR helper to install\n"
330 select OPT in "${aurhelper[@]}"; do
331 case "$REPLY" in
332 1)
333 print_title "YAOURT - https://wiki.archlinux.org/index.php/Yaourt"
334 print_info "Yaourt (Yet AnOther User Repository Tool) is a community-contributed wrapper for pacman which adds seamless access to the AUR, allowing and automating package compilation and installation from your choice of the thousands of PKGBUILDs in the AUR, in addition to the many thousands of available Arch Linux binary packages."
335 if ! is_package_installed "yaourt" ; then
336 package_install "base-devel yajl namcap"
337 pacman -D --asdeps yajl namcap
338 aui_download_packages "package-query yaourt"
339 pacman -D --asdeps package-query
340 if ! is_package_installed "yaourt" ; then
341 echo "Yaourt not installed. EXIT now"
342 pause_function
343 exit 0
344 fi
Helmuth Saatkampaa5816e2012-07-31 14:27:31 -0300345 fi
Helmuth2f259c52013-07-18 15:47:19 -0300346 AUR_PKG_MANAGER="yaourt"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300347 ;;
348 2)
349 if ! is_package_installed "packer" ; then
350 package_install "base-devel git jshon"
351 pacman -D --asdeps jshon
352 aui_download_packages "packer"
353 if ! is_package_installed "packer" ; then
354 echo "Packer not installed. EXIT now"
355 pause_function
356 exit 0
357 fi
Helmuth Saatkampaa5816e2012-07-31 14:27:31 -0300358 fi
Helmuth2f259c52013-07-18 15:47:19 -0300359 AUR_PKG_MANAGER="packer"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300360 ;;
361 3)
362 if ! is_package_installed "pacaur" ; then
363 package_install "base-devel yajl expac"
364 pacman -D --asdeps yajl expac
365 #fix pod2man path
366 ln -s /usr/bin/core_perl/pod2man /usr/bin/
367 aui_download_packages "cower pacaur"
368 pacman -D --asdeps cower
369 if ! is_package_installed "pacaur" ; then
370 echo "Pacaur not installed. EXIT now"
371 pause_function
372 exit 0
373 fi
Helmuth Saatkampaa5816e2012-07-31 14:27:31 -0300374 fi
Helmuth2f259c52013-07-18 15:47:19 -0300375 AUR_PKG_MANAGER="pacaur"
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200376 ;;
377 *)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300378 invalid_option
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200379 ;;
380 esac
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300381 [[ -n $OPT ]] && break
382 done
383 pause_function
384}
385#}}}
Helmuth2f259c52013-07-18 15:47:19 -0300386#POWERPILL {{{
387install_powerpill (){
388 print_title "POWERPILL - https://wiki.archlinux.org/index.php/Powerpill"
389 print_info "Powerpill is a Pacman wrapper that uses parallel and segmented downloading to try to speed up downloads for Pacman."
390 read_input_text "Install Powerpill"
391 if [[ $OPTION == y ]]; then
392 aur_package_install "powerpill"
Helmuth2f259c52013-07-18 15:47:19 -0300393 fi
Helmuthc58515a2013-08-14 10:52:14 -0300394 is_package_installed "powerpill" && PKG_MANAGER="powerpill"
Helmuth2f259c52013-07-18 15:47:19 -0300395}
396#}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300397#AUTOMATIC MODE {{{
398automatic_mode(){
399 print_title "AUTOMATIC MODE"
400 print_info "Create a custom install with all options pre-selected.\nUse this option with care."
401 print_warning "\tUse this mode only if you already know all the option.\n\tYou won't be able to select anything later."
402 read_input_text "Enable Automatic Mode"
403 if [[ $OPTION == y ]]; then
Helmuth Saatkampce476a62013-04-24 10:58:33 -0300404 $EDITOR ${AUI_DIR}/aui_automode
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300405 source ${AUI_DIR}/aui_automode
406 echo -e "The installation will start now."
407 pause_function
408 AUTOMATIC_MODE=1
409 fi
410}
411#}}}
412#CUSTOM REPOSITORIES {{{
413add_custom_repositories(){
414 # ENABLE MULTILIB REPOSITORY {{{
415 # this option will avoid any problem with packages install
416 if [[ $ARCHI == x86_64 ]]; then
Helmuth Saatkamp821485d2013-05-30 11:11:45 -0300417 local MULTILIB=`grep -n "\[multilib\]" /etc/pacman.conf | cut -f1 -d:`
418 if [[ -z $MULTILIB ]]; then
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300419 echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
420 echo -e '\nMultilib repository added into pacman.conf file'
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200421 else
Helmuth Saatkamp821485d2013-05-30 11:11:45 -0300422 sed -i "${MULTILIB}s/^#//" /etc/pacman.conf
423 local MULTILIB=$(( $MULTILIB + 1 ))
424 sed -i "${MULTILIB}s/^#//" /etc/pacman.conf
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300425 fi
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300426 fi
427 #}}}
428 print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
429 read_input_text "Add custom repositories" $CUSTOMREPO
430 if [[ $OPTION == y ]]; then
431 while true
432 do
433 print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
434 echo " 1) \"Add new repository\""
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200435 echo ""
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300436 echo " d) DONE"
437 echo ""
438 read -p "$prompt1" OPTION
439 case $OPTION in
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200440 1)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300441 read -p "Repository Name [ex: custom]: " REPONAME
442 read -p "Repository Address [ex: file:///media/backup/Archlinux]: " REPOADDRESS
443 echo -e '\n['"$REPONAME"']\nServer = '"$REPOADDRESS"/'$arch' >> /etc/pacman.conf
444 echo -e '\nCustom repository added into pacman.conf file'
445 pause_function
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200446 ;;
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300447 "d")
448 break
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200449 ;;
450 *)
451 invalid_option
452 ;;
453 esac
454 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300455 fi
Helmuthd5f02092013-09-24 09:42:23 -0300456 system_update
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300457}
458#}}}
459#BASIC SETUP {{{
460install_basic_setup(){
461 print_title "BASH TOOLS - https://wiki.archlinux.org/index.php/Bash"
462 package_install "bc rsync mlocate bash-completion pkgstats"
463 print_title "NTPd - https://wiki.archlinux.org/index.php/NTPd"
464 package_install "ntp"
465 is_package_installed "ntp" && timedatectl set-ntp true
466 pause_function
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300467 print_title "(UN)COMPRESS TOOLS - https://wiki.archlinux.org/index.php/P7zip"
468 package_install "zip unzip unrar p7zip"
469 pause_function
470 print_title "AVAHI - https://wiki.archlinux.org/index.php/Avahi"
471 print_info "Avahi is a free Zero Configuration Networking (Zeroconf) implementation, including a system for multicast DNS/DNS-SD discovery. It allows programs to publish and discovers and hosts running on a local network with no specific configuration."
472 package_install "avahi nss-mdns"
Helmuth1d4e6712013-08-14 11:04:23 -0300473 is_package_installed "avahi" && system_ctl enable avahi-daemon
474 is_package_installed "avahi" && system_ctl enable avahi-dnsconfd
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300475 pause_function
476 print_title "ALSA - https://wiki.archlinux.org/index.php/Alsa"
477 print_info "The Advanced Linux Sound Architecture (ALSA) is a Linux kernel component intended to replace the original Open Sound System (OSSv3) for providing device drivers for sound cards."
478 package_install "alsa-utils alsa-plugins"
479 [[ ${ARCHI} == x86_64 ]] && package_install "lib32-alsa-plugins"
480 pause_function
481 print_title "PULSEAUDIO - https://wiki.archlinux.org/index.php/Pulseaudio"
482 print_info "PulseAudio is the default sound server that serves as a proxy to sound applications using existing kernel sound components like ALSA or OSS"
483 package_install "pulseaudio pulseaudio-alsa"
484 [[ ${ARCHI} == x86_64 ]] && package_install "lib32-libpulse"
Helmuthd5f02092013-09-24 09:42:23 -0300485 # automatically switch to newly-connected devices
486 add_line "load-module module-switch-on-connect" "/etc/pulse/default.pa"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300487 pause_function
488 print_title "NTFS/FAT/exFAT - https://wiki.archlinux.org/index.php/File_Systems"
489 print_info "A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device(s) which contain it. A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device."
490 package_install "ntfs-3g dosfstools exfat-utils fuse fuse-exfat"
491 is_package_installed "fuse" && add_module "fuse"
492 pause_function
493}
494#}}}
495#SSH {{{
496install_ssh(){
497 print_title "SSH - https://wiki.archlinux.org/index.php/Ssh"
498 print_info "Secure Shell (SSH) is a network protocol that allows data to be exchanged over a secure channel between two computers."
499 read_input_text "Install ssh" $SSH
500 if [[ $OPTION == y ]]; then
501 package_install "openssh"
502 aur_package_install "rssh"
Helmuth1d4e6712013-08-14 11:04:23 -0300503 system_ctl enable sshd
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300504 [[ ! -f /etc/ssh/sshd_config.aui ]] && cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config.aui;
505 #CONFIGURE SSHD_CONF #{{{
506 sed -i '/Port 22/s/^#//' /etc/ssh/sshd_config
507 sed -i '/Protocol 2/s/^#//' /etc/ssh/sshd_config
508 sed -i '/HostKey \/etc\/ssh\/ssh_host_rsa_key/s/^#//' /etc/ssh/sshd_config
509 sed -i '/HostKey \/etc\/ssh\/ssh_host_dsa_key/s/^#//' /etc/ssh/sshd_config
510 sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/s/^#//' /etc/ssh/sshd_config
511 sed -i '/KeyRegenerationInterval/s/^#//' /etc/ssh/sshd_config
512 sed -i '/ServerKeyBits/s/^#//' /etc/ssh/sshd_config
513 sed -i '/SyslogFacility/s/^#//' /etc/ssh/sshd_config
514 sed -i '/LogLevel/s/^#//' /etc/ssh/sshd_config
515 sed -i '/LoginGraceTime/s/^#//' /etc/ssh/sshd_config
516 sed -i '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
517 sed -i '/HostbasedAuthentication/s/^#//' /etc/ssh/sshd_config
518 sed -i '/StrictModes/s/^#//' /etc/ssh/sshd_config
519 sed -i '/RSAAuthentication/s/^#//' /etc/ssh/sshd_config
520 sed -i '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
521 sed -i '/IgnoreRhosts/s/^#//' /etc/ssh/sshd_config
522 sed -i '/PermitEmptyPasswords/s/^#//' /etc/ssh/sshd_config
523 sed -i '/AllowTcpForwarding/s/^#//' /etc/ssh/sshd_config
524 sed -i '/AllowTcpForwarding no/d' /etc/ssh/sshd_config
525 sed -i '/X11Forwarding/s/^#//' /etc/ssh/sshd_config
526 sed -i '/X11Forwarding/s/no/yes/' /etc/ssh/sshd_config
527 sed -i -e '/\tX11Forwarding yes/d' /etc/ssh/sshd_config
528 sed -i '/X11DisplayOffset/s/^#//' /etc/ssh/sshd_config
529 sed -i '/X11UseLocalhost/s/^#//' /etc/ssh/sshd_config
530 sed -i '/PrintMotd/s/^#//' /etc/ssh/sshd_config
531 sed -i '/PrintMotd/s/yes/no/' /etc/ssh/sshd_config
532 sed -i '/PrintLastLog/s/^#//' /etc/ssh/sshd_config
533 sed -i '/TCPKeepAlive/s/^#//' /etc/ssh/sshd_config
534 sed -i '/the setting of/s/^/#/' /etc/ssh/sshd_config
535 sed -i '/RhostsRSAAuthentication and HostbasedAuthentication/s/^/#/' /etc/ssh/sshd_config
Helmuth Saatkampaa5816e2012-07-31 14:27:31 -0300536 #}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300537 pause_function
538 fi
539}
540#}}}
541#NFS {{{
542install_nfs(){
543 print_title "NFS - https://wiki.archlinux.org/index.php/Nfs"
544 print_info "NFS allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed."
545 read_input_text "Install nfs" $NFS
546 if [[ $OPTION == y ]]; then
547 package_install "nfs-utils"
Helmuth1d4e6712013-08-14 11:04:23 -0300548 system_ctl enable rpc-idmapd
549 system_ctl enable rpc-mountd
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300550 pause_function
551 fi
552}
553#}}}
554#SAMBA {{{
555install_samba(){
556 print_title "SAMBA - https://wiki.archlinux.org/index.php/Samba"
557 print_info "Samba is a re-implementation of the SMB/CIFS networking protocol, it facilitates file and printer sharing among Linux and Windows systems as an alternative to NFS."
558 read_input_text "Install Samba" $SAMBA
559 if [[ $OPTION == y ]]; then
Helmuth Saatkamp222bb882013-05-03 00:14:19 -0300560 package_install "samba smbnetfs"
Helmuth Saatkamp8d7a9442013-05-02 23:36:25 -0300561 [[ ! -f /etc/samba/smb.conf ]] && cp /etc/samba/smb.conf.default /etc/samba/smb.conf
562 local CONFIG_SAMBA=`cat /etc/samba/smb.conf | grep usershare`
563 if [[ -z $CONFIG_SAMBA ]]; then
564 # configure usershare
565 export USERSHARES_DIR="/var/lib/samba/usershares"
566 export USERSHARES_GROUP="sambashare"
567 mkdir -p ${USERSHARES_DIR}
568 groupadd ${USERSHARES_GROUP}
569 chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
570 chmod 01770 ${USERSHARES_DIR}
571 sed -i -e '/\[global\]/a\\n usershare path = /var/lib/samba/usershares\n usershare max shares = 100\n usershare allow guests = yes\n usershare owner only = False' /etc/samba/smb.conf
572 usermod -a -G ${USERSHARES_GROUP} ${USER_NAME}
Helmuth Saatkamp222bb882013-05-03 00:14:19 -0300573 sed -i '/user_allow_other/s/^#//' /etc/fuse.conf
574 modprobe fuse
Helmuth Saatkamp8d7a9442013-05-02 23:36:25 -0300575 fi
576 # enable services
Helmuth1d4e6712013-08-14 11:04:23 -0300577 system_ctl enable smbd
578 system_ctl enable nmbd
Helmuth6633a432013-08-20 15:07:18 -0300579 # automatic mounting
580 system_ctl enable smbnetfs
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300581 pause_function
582 fi
583}
584#}}}
Helmuth6633a432013-08-20 15:07:18 -0300585#READAHEAD {{{
Helmutha960f812013-08-14 11:52:13 -0300586enable_readahead(){
587 print_title "Readahead - https://wiki.archlinux.org/index.php/Improve_Boot_Performance"
588 print_info "Systemd comes with its own readahead implementation, this should in principle improve boot time. However, depending on your kernel version and the type of your hard drive, your mileage may vary (i.e. it might be slower)."
589 read_input_text "Enable Readahead" $READAHEAD
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300590 if [[ $OPTION == y ]]; then
Helmutha960f812013-08-14 11:52:13 -0300591 system_ctl enable systemd-readahead-collect
592 system_ctl enable systemd-readahead-replay
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300593 pause_function
594 fi
595}
596#}}}
597#ZRAM {{{
598install_zram (){
599 print_title "ZRAM - https://wiki.archlinux.org/index.php/Maximizing_Performance"
600 print_info "Zram creates a device in RAM and compresses it. If you use for swap means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution)."
601 read_input_text "Install Zram" $ZRAM
602 if [[ $OPTION == y ]]; then
603 aur_package_install "zramswap"
Helmuth1d4e6712013-08-14 11:04:23 -0300604 system_ctl enable zramswap
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300605 pause_function
606 fi
607}
608#}}}
609#TLP {{{
610install_tlp(){
611 print_title "TLP - https://wiki.archlinux.org/index.php/Tlp"
612 print_info "TLP is an advanced power management tool for Linux. It is a pure command line tool with automated background tasks and does not contain a GUI."
613 read_input_text "Install TLP " $TLP
614 if [[ $OPTION == y ]]; then
615 aur_package_install "tlp"
616 tlp start
Helmuth1d4e6712013-08-14 11:04:23 -0300617 system_ctl enable tlp
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300618 pause_function
619 fi
620}
621#}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300622#XORG {{{
623install_xorg(){
624 print_title "XORG - https://wiki.archlinux.org/index.php/Xorg"
625 print_info "Xorg is the public, open-source implementation of the X window system version 11."
626 echo "Installing X-Server (req. for Desktopenvironment, GPU Drivers, Keyboardlayout,...)"
Helmuth77932112013-08-09 14:03:39 -0300627 package_install "xorg-server xorg-server-utils xorg-xinit"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300628 package_install "xf86-input-synaptics xf86-input-mouse xf86-input-keyboard"
629 package_install "mesa"
630 package_install "gamin"
631 KEYMAP=$(localectl status | grep Keymap | awk '{print $3}')
632 localectl set-keymap ${KEYMAP}
633 pause_function
634}
635#}}}
636#FONT CONFIGURATION {{{
637font_config(){
638 while true
639 do
640 print_title "FONTS CONFIGURATION - https://wiki.archlinux.org/index.php/Font_Configuration"
641 print_info "Fontconfig is a library designed to provide a list of available fonts to applications, and also for configuration for how fonts get rendered."
642 echo " 1) Default"
643 echo " 2) Infinality"
644 echo " 3) Ubuntu"
645 echo ""
646 read_input $FONTCONFIG
647 case "$OPTION" in
648 1)
649 is_package_installed "freetype2-infinality" && pacman -Rdds freetype2-infinality fontconfig-infinality
650 is_package_installed "freetype2-ubuntu" && pacman -Rdds freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu
Helmuthd5f02092013-09-24 09:42:23 -0300651 pacman -S --asdeps --needed cairo fontconfig freetype2 libxft
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300652 #enable global fonts configs
653 cd /etc/fonts/conf.d
654 [[ ! -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf ]] && ln -sv ../conf.avail/10-sub-pixel-rgb.conf
655 [[ ! -f /etc/fonts/conf.d/10-autohint.conf ]] && ln -sv ../conf.avail/10-autohint.conf
656 [[ ! -f /etc/fonts/conf.d/11-lcdfilter-default.conf ]] && ln -sv ../conf.avail/11-lcdfilter-default.conf
657 [[ ! -f /etc/fonts/conf.d/70-no-bitmaps.conf ]] && ln -s ../conf.avail/70-no-bitmaps.conf
658 cd $AUI_DIR
659 break
660 ;;
661 2)
662 is_package_installed "freetype2" && pacman -Rdds --noconfirm freetype2
663 aur_package_install "freetype2-infinality fontconfig-infinality"
664 /etc/profile.d/infinality-settings.sh
665 infctl setstyle
666 break
667 ;;
668 3)
669 is_package_installed "freetype2" && pacman -Rdds --noconfirm freetype2 fontconfig cairo libxft
670 aur_package_install "freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu"
671 break
672 ;;
673 *)
674 invalid_option
675 ;;
676 esac
677 done
678 pause_function
679}
680#}}}
681#VIDEO CARDS {{{
682install_video_cards(){
683 package_install "dmidecode"
Helmuthcaebeeb2013-08-23 11:43:33 -0300684 print_title "VIDEO CARD"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300685 check_vga
686 #Virtualbox {{{
687 if [[ ${VIDEO_DRIVER} == virtualbox ]]; then
688 package_install "virtualbox-guest-utils"
689 add_module "vboxguest vboxsf vboxvideo" "virtualbox-guest"
690 add_user_to_group ${USER_NAME} vboxsf
Helmuth1d4e6712013-08-14 11:04:23 -0300691 system_ctl disable ntpd
692 system_ctl enable vbo
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300693 VBoxClient-all
694 #}}}
695 #NVIDIA {{{
696 elif [[ ${VIDEO_DRIVER} == nvidia ]]; then
697 XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
698 [[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
699 is_package_installed "nouveau-dri" && pacman -Rdds --noconfirm nouveau-dri
Helmuthd5f02092013-09-24 09:42:23 -0300700 pacman -S --needed nvidia{,-utils}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300701 package_install "pangox-compat" #fix nvidia-settings
702 package_install "libva-vdpau-driver"
703 if [[ ${ARCHI} == x86_64 ]]; then
704 is_package_installed "lib32-nouveau-dri" && pacman -Rdds --noconfirm lib32-nouveau-dri
Helmuthd5f02092013-09-24 09:42:23 -0300705 pacman -S --needed "lib32-nvidia-utils"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300706 fi
Helmuthd5f02092013-09-24 09:42:23 -0300707 replace_line '*options nouveau modeset=1' '#options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
708 replace_line '*MODULES="nouveau"' '#MODULES="nouveau"' /etc/mkinitcpio.conf
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300709 mkinitcpio -p linux
710 nvidia-xconfig --add-argb-glx-visuals --allow-glx-with-composite --composite -no-logo --render-accel -o /etc/X11/xorg.conf.d/20-nvidia.conf;
711 #}}}
712 #Nouveau [NVIDIA] {{{
713 elif [[ ${VIDEO_DRIVER} == nouveau ]]; then
714 is_package_installed "nvidia" && pacman -Rdds --noconfirm nvidia{,-utils}
715 [[ -f /etc/X11/xorg.conf.d/20-nvidia.conf ]] && rm /etc/X11/xorg.conf.d/20-nvidia.conf
Helmuthd5f02092013-09-24 09:42:23 -0300716 pacman -S --asdeps mesa-libgl
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300717 package_install "xf86-video-${VIDEO_DRIVER} ${VIDEO_DRIVER}-dri"
718 if [[ ${ARCHI} == x86_64 ]]; then
Helmuthfdff0cb2013-08-12 14:41:31 -0300719 is_package_installed "lib32-nvidia-utils" && pacman -Rdds --noconfirm lib32-nvidia-utils
Helmuthd5f02092013-09-24 09:42:23 -0300720 pacman -S --needed "lib32-${VIDEO_DRIVER}-dri"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300721 fi
Helmuthd5f02092013-09-24 09:42:23 -0300722 replace_line '#*options nouveau modeset=1' 'options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
723 replace_line '#*MODULES="nouveau"' 'MODULES="nouveau"' /etc/mkinitcpio.conf
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300724 mkinitcpio -p linux
725 #}}}
726 #Catalyst [ATI] {{{
727 elif [[ ${VIDEO_DRIVER} == catalyst ]]; then
728 XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
729 [[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
730 is_package_installed "ati-dri" && pacman package_remove "ati-dri"
731 [[ -f /etc/modules-load.d/ati.conf ]] && rm /etc/modules-load.d/ati.conf
732 package_install "linux-headers"
Helmuth49321192013-09-05 14:39:06 -0300733 # Add repository
Helmuthd5f02092013-09-24 09:42:23 -0300734 pacman-key --keyserver pgp.mit.edu --recv-keys 0xabed422d653c3094
735 pacman-key --lsign-key 0xabed422d653c3094
736 add_repository "catalyst" "http://catalyst.wirephire.com/repo/catalyst/\$arch"
737 pacman -S --needed catalyst catalyst-utils
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300738 if [[ ${ARCHI} == x86_64 ]]; then
739 is_package_installed "lib32-ati-dri" && pacman -Rdds --noconfirm lib32-ati-dri
Helmuthd5f02092013-09-24 09:42:23 -0300740 pacman -S --needed "lib32-catalyst-utils"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300741 fi
Helmuth49321192013-09-05 14:39:06 -0300742 package_install "catalyst-hook"
743 system_ctl enable catalyst-hook
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300744 aticonfig --initial --output=/etc/X11/xorg.conf.d/20-radeon.conf
745 add_module "fglrx" "ati"
746 #}}}
747 #ATI {{{
748 elif [[ ${VIDEO_DRIVER} == ati ]]; then
749 is_package_installed "catalyst-dkms" && pacman -Rdds --noconfirm catalyst{-dkms,-utils} lib32-catalyst-utils
Helmuthd5f02092013-09-24 09:42:23 -0300750 pacman -S --asdeps mesa-libgl
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300751 [[ -f /etc/X11/xorg.conf.d/20-radeon.conf ]] && rm /etc/X11/xorg.conf.d/20-radeon.conf
752 [[ -f /etc/modules-load.d/ati.conf ]] && rm /etc/modules-load.d/ati.conf
753 package_install "xf86-video-${VIDEO_DRIVER} ${VIDEO_DRIVER}-dri"
754 if [[ ${ARCHI} == x86_64 ]]; then
755 is_package_installed "lib32-catalyst-utils" && pacman -Rdds --noconfirm lib32-catalyst-utils
756 package_install "lib32-${VIDEO_DRIVER}-dri"
757 fi
758 add_module "radeon" "ati"
759 #}}}
760 #Intel {{{
761 elif [[ ${VIDEO_DRIVER} == intel ]]; then
762 package_install "xf86-video-intel intel-dri libva-intel-driver"
763 [[ ${ARCHI} == x86_64 ]] && package_install "lib32-mesa-libgl"
764 #}}}
Helmuthd5f02092013-09-24 09:42:23 -0300765 #Vesa {{{
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300766 else
767 package_install "xf86-video-${VIDEO_DRIVER}"
768 [[ ${ARCHI} == x86_64 ]] && package_install "lib32-mesa-libgl"
769 fi
Helmuthd5f02092013-09-24 09:42:23 -0300770 #}}}
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300771 pause_function
772}
773#}}}
774#CUPS {{{
775install_cups(){
776 print_title "CUPS - https://wiki.archlinux.org/index.php/Cups"
777 print_info "CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like operating systems."
778 read_input_text "Install CUPS (aka Common Unix Printing System)" $CUPS
779 if [[ $OPTION == y ]]; then
780 package_install "cups cups-filters ghostscript gsfonts"
781 package_install "gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters hplip splix cups-pdf"
Helmuth1d4e6712013-08-14 11:04:23 -0300782 system_ctl enable cups
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300783 pause_function
784 fi
785}
786#}}}
787#ADDITIONAL FIRMWARE {{{
788install_additional_firmwares(){
789 print_title "INSTALL ADDITIONAL FIRMWARES"
790 read_input_text "Install additional firmwares [Audio,Bluetooth,Scanner,Wireless]" $FIRMWARE
791 if [[ $OPTION == y ]]; then
792 while true
793 do
794 print_title "INSTALL ADDITIONAL FIRMWARES"
795 echo " 1) $(menu_item "alsa-firmware")"
796 echo " 2) $(menu_item "ipw2100-fw")"
797 echo " 3) $(menu_item "ipw2200-fw")"
798 echo " 4) $(menu_item "b43-firmware") $AUR"
799 echo " 5) $(menu_item "b43-firmware-legacy") $AUR"
800 echo " 6) $(menu_item "broadcom-wl") $AUR"
Helmuth2f259c52013-07-18 15:47:19 -0300801 echo " 7) $(menu_item "bluez-firmware") [Broadcom BCM203x/STLC2300 Bluetooth]"
802 echo " 8) $(menu_item "libmtp") [Android Devices]"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300803 echo " 9) $(menu_item "libffado") [Fireware Audio Devices]"
804 echo "10) $(menu_item "libraw1394") [IEEE1394 Driver]"
Helmuth Saatkamp65e83d92013-05-22 23:33:19 -0300805 echo "11) $(menu_item "aic94xx-firmware") $AUR"
806 echo "12) $(menu_item "bfa-firmware") $AUR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300807 echo ""
808 echo " d) DONE"
809 echo ""
810 FIRMWARE_OPTIONS+=" d"
811 read_input_options "$FIRMWARE_OPTIONS"
812 for OPT in ${OPTIONS[@]}; do
813 case "$OPT" in
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -0200814 1)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300815 package_install "alsa-firmware"
816 ;;
817 2)
818 package_install "ipw2100-fw"
819 ;;
820 3)
821 package_install "ipw2200-fw"
822 ;;
823 4)
824 aur_package_install "b43-firmware"
825 ;;
826 5)
827 aur_package_install "b43-firmware-legacy"
828 ;;
829 6)
830 aur_package_install "broadcom-wl"
831 ;;
832 7)
Helmuth2f259c52013-07-18 15:47:19 -0300833 package_install "bluez-firmware"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300834 ;;
835 8)
Helmuth2f259c52013-07-18 15:47:19 -0300836 package_install "libmtp"
837 aur_package_install "android-udev"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300838 ;;
839 9)
840 package_install "libffado"
841 ;;
842 10)
843 package_install "libraw1394"
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -0200844 ;;
Helmuth Saatkamp65e83d92013-05-22 23:33:19 -0300845 11)
846 aur_package_install "aic94xx-firmware"
847 ;;
848 12)
849 aur_package_install "bfa-firmware"
850 ;;
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -0200851 "d")
852 break
853 ;;
854 *)
855 invalid_option
856 ;;
857 esac
858 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300859 elihw
860 done
861 fi
862}
863#}}}
864#GIT ACCESS THRU A FIREWALL {{{
865install_git_tor(){
866 print_title "GIT-TOR - https://wiki.archlinux.org/index.php/Tor"
867 print_info "Tor is an open source implementation of 2nd generation onion routing that provides free access to an anonymous proxy network. Its primary goal is to enable online anonymity by protecting against traffic analysis attacks."
868 read_input_text "Ensuring access to GIT through a firewall (bypass college/work firewall)" $GITTOR
869 if [[ $OPTION == y ]]; then
870 package_install "openbsd-netcat vidalia privoxy git"
871 if [[ ! -f /usr/bin/proxy-wrapper ]]; then
872 echo 'forward-socks5 / 127.0.0.1:9050 .' >> /etc/privoxy/config
873 echo -e '#!/bin/bash\nnc -xlocalhost:9050 -X5 $*' > /usr/bin/proxy-wrapper
874 chmod +x /usr/bin/proxy-wrapper
875 echo -e '\nexport GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"' >> /etc/bash.bashrc
876 export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"
877 su - ${USER_NAME} -c 'export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"'
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -0200878 fi
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300879 groupadd -g 42 privoxy
880 useradd -u 42 -g privoxy -s /bin/false -d /etc/privoxy privoxy
Helmuth1d4e6712013-08-14 11:04:23 -0300881 system_ctl start tor
882 system_ctl start privoxy
883 system_ctl enable tor
884 system_ctl enable privoxy
Helmuth Saatkampf89c9c62012-12-05 19:10:58 -0200885 pause_function
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300886 fi
887}
888#}}}
889#DESKTOP ENVIRONMENT {{{
890install_desktop_environment(){
891 install_icon_theme() { #{{{
892 package_install "gtk-update-icon-cache"
Helmuth Saatkampd2c6aff2013-04-15 11:18:38 -0300893 while true
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -0200894 do
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300895 print_title "GNOME ICONS"
896 echo " 1) $(menu_item "awoken-icons" "Awoken")"
897 echo " 2) $(menu_item "elementary-xfce-icons" "Elementary XFCE")"
898 echo " 3) $(menu_item "faenza-icon-theme")"
899 echo " 4) $(menu_item "faenza-cupertino-icon-theme" "Faenza-Cupertino")"
900 echo " 5) $(menu_item "faience-icon-theme")"
901 echo " 6) $(menu_item "inx-icon-theme" "iNX")"
902 echo " 7) $(menu_item "matrilineare-icon-theme")"
Helmuth02c8d402013-09-16 08:44:57 -0300903 echo " 8) $(menu_item "moka-icon-theme-git")"
904 echo " 9) $(menu_item "nitrux-icon-theme")"
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -0200905 echo ""
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300906 echo " b) BACK"
907 echo ""
908 ICONS_THEMES+=" b"
909 read_input_options "$ICONS_THEMES"
910 for OPT in ${OPTIONS[@]}; do
911 case "$OPT" in
912 1)
913 aur_package_install "awoken-icons"
914 ;;
915 2)
916 aur_package_install "elementary-xfce-icons"
917 ;;
918 3)
919 package_install "faenza-icon-theme"
920 ;;
921 4)
922 aur_package_install "faenza-cupertino-icon-theme"
923 ;;
924 5)
925 package_install "faience-icon-theme"
926 ;;
927 6)
928 aur_package_install "inx-icon-theme"
929 ;;
930 7)
931 aur_package_install "matrilineare-icon-theme"
932 ;;
933 8)
Helmuth02c8d402013-09-16 08:44:57 -0300934 aur_package_install "moka-icon-theme-git"
935 ;;
936 9)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300937 aur_package_install "nitrux-icon-theme"
938 ;;
939 "b")
940 break
941 ;;
942 *)
943 invalid_option
944 ;;
945 esac
946 done
947 elihw
948 done
949 } #}}}
950 install_gtk_theme() { #{{{
951 while true
952 do
953 print_title "GTK2/GTK3 THEMES"
Helmuth Saatkamp4a0a9682013-04-24 22:07:25 -0300954 echo " 1) $(menu_item "xfce-theme-greybird-git" "Greybird")"
Helmuth02c8d402013-09-16 08:44:57 -0300955 echo " 2) $(menu_item "gtk-theme-numix-git" "Numix")"
956 echo " 3) $(menu_item "gtk-theme-orion-git" "Orion")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300957 echo ""
958 echo " b) BACK"
959 echo ""
960 GTK_THEMES+=" b"
961 read_input_options "$GTK_THEMES"
962 for OPT in ${OPTIONS[@]}; do
963 case "$OPT" in
964 1)
Helmuth Saatkamp4a0a9682013-04-24 22:07:25 -0300965 aur_package_install "xfce-theme-greybird-git"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300966 ;;
967 2)
Helmuth Saatkamp4a0a9682013-04-24 22:07:25 -0300968 aur_package_install "gtk-theme-numix-git"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300969 ;;
Helmuth02c8d402013-09-16 08:44:57 -0300970 3)
971 aur_package_install "gtk-theme-orion-git"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300972 ;;
973 "b")
974 break
975 ;;
976 *)
977 invalid_option
978 ;;
979 esac
980 done
981 elihw
982 done
983 } #}}}
984 install_display_manager() { #{{{
985 while true
986 do
987 print_title "DISPLAY MANAGER - https://wiki.archlinux.org/index.php/Display_Manager"
988 print_info "A display manager, or login manager, is a graphical interface screen that is displayed at the end of the boot process in place of the default shell."
Helmuth Saatkamp5ef4edb2013-05-02 23:13:08 -0300989 echo " 1) $(menu_item "entrance-git" "Entrance") $AUR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -0300990 echo " 2) $(menu_item "gdm" "GDM")"
991 echo " 3) $(menu_item "lightdm" "LightDM") $AUR"
992 echo " 4) $(menu_item "lxdm" "LXDM")"
993 echo " 5) $(menu_item "slim")"
994 echo ""
995 echo " b) BACK|SKIP"
996 echo ""
997 DISPLAY_MANAGER+=" b"
998 read_input_options "$DISPLAY_MANAGER"
999 for OPT in ${OPTIONS[@]}; do
1000 case "$OPT" in
1001 1)
Helmuth Saatkamp5ef4edb2013-05-02 23:13:08 -03001002 aur_package_install "entrance-git"
Helmuth1d4e6712013-08-14 11:04:23 -03001003 system_ctl enable entrance
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001004 ;;
1005 2)
1006 package_install "gdm"
Helmuth1d4e6712013-08-14 11:04:23 -03001007 system_ctl enable gdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001008 ;;
1009 3)
1010 if [[ ${KDE} -eq 1 ]]; then
1011 package_install "lightdm lightdm-kde-greeter"
1012 else
1013 package_install "lightdm lightdm-gtk3-greeter"
1014 fi
Helmuth1d4e6712013-08-14 11:04:23 -03001015 system_ctl enable lightdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001016 ;;
1017 4)
1018 package_install "lxdm"
Helmuth1d4e6712013-08-14 11:04:23 -03001019 system_ctl enable lxdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001020 ;;
1021 5)
1022 package_install "slim"
Helmuth1d4e6712013-08-14 11:04:23 -03001023 system_ctl enable slim
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001024 ;;
1025 "b")
1026 break
1027 ;;
1028 *)
1029 invalid_option
1030 ;;
1031 esac
1032 done
1033 elihw
1034 done
1035 } #}}}
1036 install_themes() { #{{{
1037 while true
1038 do
1039 print_title "$1 THEMES"
1040 echo " 1) $(menu_item "awoken-icons faenza-icon-theme faenza-cupertino-icon-theme faience-icon-theme elementary-xfce-icons inx-icon-theme matrilineare-icon-theme nitrux-icon-theme" "Icons Themes") $AUR"
1041 echo " 2) $(menu_item "xfce-theme-greybird faience-themes gtk-theme-gnome-cupertino mediterraneannight-theme light-themes zukitwo-themes" "GTK Themes") $AUR"
1042 [[ $GNOME -eq 1 ]] && echo " 3) $(menu_item "gnome-shell-theme-default-mod" "Gnome Shell Themes") $AUR"
1043 [[ $CINNAMON -eq 1 ]] && echo " 3) $(menu_item "cinnamon-theme-ambience cinnamon-theme-baldr cinnamon-theme-google+ cinnamon-theme-eleganse cinnamon-theme-helios cinnamon-theme-elementary-luna cinnamon-theme-holo cinnamon-theme-gnome cinnamon-theme-loki" "Cinnamon themes") $AUR"
1044 echo ""
1045 echo " d) DONE"
1046 echo ""
1047 THEMES_OPTIONS+=" d"
1048 read_input_options "$THEMES_OPTIONS"
1049 for OPT in ${OPTIONS[@]}; do
1050 case "$OPT" in
1051 1)
1052 install_icon_theme
1053 OPT=1
1054 ;;
1055 2)
1056 install_gtk_theme
1057 OPT=2
1058 ;;
1059 3)
1060 if [[ $GNOME -eq 1 ]]; then
1061 #GNOME SHELL THEMES {{{
1062 while true
1063 do
1064 print_title "GNOME SHELL THEMES"
1065 echo " 1) $(menu_item "gnome-shell-theme-default-mod")"
1066 echo ""
1067 echo " b) BACK"
1068 echo ""
1069 GNOME_SHELL_THEMES+=" b"
1070 read_input_options "$GNOME_SHELL_THEMES"
1071 for OPT in ${OPTIONS[@]}; do
1072 case "$OPT" in
1073 1)
1074 aur_package_install "gnome-shell-theme-default-mod"
1075 ;;
1076 "b")
1077 break
1078 ;;
1079 *)
1080 invalid_option
1081 ;;
1082 esac
1083 done
1084 elihw
1085 done
1086 #}}}
1087 elif [[ $CINNAMON -eq 1 ]]; then
1088 #CINNAMON THEMES {{{
1089 while true
1090 do
1091 print_title "CINNAMON THEMES"
1092 echo " 1) $(menu_item "cinnamon-theme-ambience")"
1093 echo " 2) $(menu_item "cinnamon-theme-baldr")"
1094 echo " 3) $(menu_item "cinnamon-theme-eleganse")"
1095 echo " 4) $(menu_item "cinnamon-theme-elementary-luna")"
1096 echo " 5) $(menu_item "cinnamon-theme-gnome")"
1097 echo " 6) $(menu_item "cinnamon-theme-faience")"
1098 echo " 7) $(menu_item "cinnamon-theme-google+")"
1099 echo " 8) $(menu_item "cinnamon-theme-helios")"
1100 echo " 9) $(menu_item "cinnamon-theme-holo")"
1101 echo "10) $(menu_item "cinnamon-theme-nadia")"
1102 echo "11) $(menu_item "cinnamon-theme-loki")"
1103 echo ""
1104 echo " b) BACK"
1105 echo ""
1106 CINNAMON_THEMES+=" b"
1107 read_input_options "$CINNAMON_THEMES"
1108 for OPT in ${OPTIONS[@]}; do
1109 case "$OPT" in
1110 1)
1111 aur_package_install "cinnamon-theme-ambience"
1112 ;;
1113 2)
1114 aur_package_install "cinnamon-theme-baldr"
1115 ;;
1116 3)
1117 aur_package_install "cinnamon-theme-eleganse"
1118 ;;
1119 4)
1120 aur_package_install "cinnamon-theme-elementary-luna"
1121 ;;
1122 5)
1123 aur_package_install "cinnamon-theme-gnome"
1124 ;;
1125 6)
1126 aur_package_install "cinnamon-theme-faience"
1127 ;;
1128 7)
1129 aur_package_install "cinnamon-theme-google+"
1130 ;;
1131 8)
1132 aur_package_install "cinnamon-theme-helios"
1133 ;;
1134 9)
1135 aur_package_install "cinnamon-theme-holo"
1136 ;;
1137 10)
1138 aur_package_install "cinnamon-theme-nadia"
1139 ;;
1140 11)
1141 aur_package_install "cinnamon-theme-loki"
1142 ;;
1143 "b")
1144 break
1145 ;;
1146 *)
1147 invalid_option
1148 ;;
1149 esac
1150 done
1151 elihw
1152 done
1153 #}}}
1154 else
1155 invalid_option
1156 fi
1157 OPT=3
1158 ;;
1159 "d")
1160 break
1161 ;;
1162 *)
1163 invalid_option
1164 ;;
1165 esac
1166 done
1167 elihw
1168 done
1169 } #}}}
1170 install_misc_apps() { #{{{
1171 while true
1172 do
1173 print_title "$1 ESSENTIAL APPS"
Helmuth Saatkamp78d98332013-05-03 07:00:49 -03001174 echo " 1) $(menu_item "entrance-git gdm lightdm lxdm slim" "Display Manager") $AUR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001175 echo " 2) $(menu_item "dmenu")"
1176 echo " 3) $(menu_item "viewnior")"
1177 echo " 4) $(menu_item "gmrun")"
1178 echo " 5) $(menu_item "pcmanfm" "PCManFM")"
1179 echo " 6) $(menu_item "rxvt-unicode")"
1180 echo " 7) $(menu_item "scrot")"
Helmuth02c8d402013-09-16 08:44:57 -03001181 echo " 8) $(menu_item "squeeze-git") $AUR"
1182 echo " 9) $(menu_item "thunar")"
1183 echo "10) $(menu_item "tint2")"
1184 echo "11) $(menu_item "volwheel")"
1185 echo "12) $(menu_item "xfburn")"
1186 echo "13) $(menu_item "xcompmgr")"
1187 echo "14) $(menu_item "zathura")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001188 echo ""
1189 echo " d) DONE"
1190 echo ""
1191 MISCAPPS+=" d"
1192 read_input_options "$MISCAPPS"
1193 for OPT in ${OPTIONS[@]}; do
1194 case "$OPT" in
1195 1)
1196 install_display_manager
1197 OPT=1
1198 ;;
1199 2)
1200 package_install "dmenu"
1201 ;;
1202 3)
1203 package_install "viewnior"
1204 ;;
1205 4)
1206 package_install "gmrun"
1207 ;;
1208 5)
Helmuth Saatkamp5ef4edb2013-05-02 23:13:08 -03001209 package_install "pcmanfm gvfs"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001210 ;;
1211 6)
1212 package_install "rxvt-unicode"
1213 ;;
1214 7)
1215 package_install "scrot"
1216 ;;
1217 8)
Helmuth02c8d402013-09-16 08:44:57 -03001218 aur_package_install "squeeze-git"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001219 ;;
1220 9)
Helmuth02c8d402013-09-16 08:44:57 -03001221 package_install "thunar tumbler"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001222 ;;
1223 10)
Helmuth02c8d402013-09-16 08:44:57 -03001224 package_install "tint2"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001225 ;;
1226 11)
Helmuth02c8d402013-09-16 08:44:57 -03001227 package_install "volwheel"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001228 ;;
1229 12)
Helmuth02c8d402013-09-16 08:44:57 -03001230 package_install "xfburn"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001231 ;;
Helmuth Saatkamp5ef4edb2013-05-02 23:13:08 -03001232 13)
Helmuth02c8d402013-09-16 08:44:57 -03001233 package_install "xcompmgr transset-df"
1234 ;;
1235 14)
Helmuth Saatkamp5ef4edb2013-05-02 23:13:08 -03001236 package_install "zathura"
1237 ;;
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001238 "d")
1239 break
1240 ;;
1241 *)
1242 invalid_option
1243 ;;
1244 esac
1245 done
1246 elihw
1247 done
1248 } #}}}
1249 print_title "DESKTOP ENVIRONMENT|WINDOW MANAGER"
1250 print_info "A DE provide a complete GUI for a system by bundling together a variety of X clients written using a common widget toolkit and set of libraries.\n\nA window manager is one component of a system's graphical user interface."
1251 echo -e "Select your DE or WM:\n"
1252 echo " --- DE --- --- WM ---"
1253 echo " 1) Cinnamon 8) Awesome"
1254 echo " 2) E17 9) Fluxbox"
1255 echo " 3) GNOME 10) OpenBox"
1256 echo " 4) KDE"
1257 echo " 5) LXDE"
1258 echo " 6) Mate"
1259 echo " 7) XFCE"
1260 echo ""
1261 echo " b) BACK"
1262 read_input $DESKTOPENV
1263 case "$OPTION" in
1264 1)
1265 #CINNAMON {{{
1266 print_title "CINNAMON - https://wiki.archlinux.org/index.php/Cinnamon"
1267 print_info "Cinnamon is a fork of GNOME Shell, initially developed by Linux Mint. It attempts to provide a more traditional user environment based on the desktop metaphor, like GNOME 2. Cinnamon uses Muffin, a fork of the GNOME 3 window manager Mutter, as its window manager."
1268 package_install "cinnamon"
Helmuth Saatkamp35f48622013-05-06 23:55:19 -03001269 package_install "cinnamon-screensaver cinnamon-control-center"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001270 package_install "gedit-plugins"
1271 package_install "telepathy"
1272 package_install "gksu xdg-user-dirs-gtk gucharmap"
1273 package_install "gvfs-smb gvfs-afc"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001274 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001275 # extensions
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001276 aur_package_install "cinnamon-applet-screenshot-record"
1277 aur_package_install "cinnamon-extension-coverflow-alt-tab"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001278 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001279 config_xinitrc "gnome-session-cinnamon"
1280 #Tweaks
1281 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-effect scale
1282 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-time 250
1283 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-transition easeInExpo
1284 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-effect scale
1285 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-time 350
1286 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-transition easeOutBack
1287 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-effect scale
1288 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-time 150
1289 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-transition easeInOutSine
1290 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-effect scale
1291 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-time 250
1292 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-transition easeInOutSine
1293 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-effect scale
1294 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-time 150
1295 sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-transition easeInOutSine
1296 CINNAMON=1
1297 pause_function
1298 install_themes "CINNAMON"
1299 #Gnome Display Manager (a reimplementation of xdm)
Helmuth1d4e6712013-08-14 11:04:23 -03001300 system_ctl enable gdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001301 #D-Bus interface for user account query and manipulation
Helmuth1d4e6712013-08-14 11:04:23 -03001302 system_ctl enable accounts-daemon
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001303 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001304 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001305 ;;
1306 #}}}
1307 2)
1308 #E17 {{{
1309 print_title "E17 - http://wiki.archlinux.org/index.php/E17"
1310 print_info "Enlightenment, also known simply as E, is a stacking window manager for the X Window System which can be used alone or in conjunction with a desktop environment such as GNOME or KDE. Enlightenment is often used as a substitute for a full desktop environment."
1311 package_install "enlightenment17"
1312 package_install "gvfs"
1313 package_install "xdg-user-dirs"
1314 package_install "leafpad epdfview"
1315 package_install "lxappearance"
1316 package_install "ttf-bitstream-vera ttf-dejavu"
1317 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001318 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001319 config_xinitrc "enlightenment_start"
1320 pause_function
1321 install_misc_apps "E17"
1322 install_themes "E17"
1323 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001324 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001325 ;;
1326 #}}}
1327 3)
1328 #GNOME {{{
1329 print_title "GNOME - https://wiki.archlinux.org/index.php/GNOME"
1330 print_info "GNOME is a desktop environment and graphical user interface that runs on top of a computer operating system. It is composed entirely of free and open source software. It is an international project that includes creating software development frameworks, selecting application software for the desktop, and working on the programs that manage application launching, file handling, and window and task management."
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001331 package_install "gnome gnome-extra zeitgeist telepathy"
Helmuth77932112013-08-09 14:03:39 -03001332 package_install "gksu nautilus-open-terminal gedit-plugins gnome-tweak-tool gnome-power-manager gucharmap"
Helmuth2f259c52013-07-18 15:47:19 -03001333 package_install "gvfs-smb gvfs-afc gvfs-goa"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001334 package_install "deja-dup"
1335 package_install "gnome-packagekit gnome-settings-daemon-updates"
1336 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001337 # empathy theme
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001338 package_install "python2-distutils-extra"
1339 aur_package_install "empathy-theme-ubuntu-adium-bzr"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001340 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001341 config_xinitrc "gnome-session"
1342 GNOME=1
1343 pause_function
1344 install_themes "GNOME"
1345 #Gnome Display Manager (a reimplementation of xdm)
Helmuth1d4e6712013-08-14 11:04:23 -03001346 system_ctl enable gdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001347 #D-Bus interface for user account query and manipulation
Helmuth1d4e6712013-08-14 11:04:23 -03001348 system_ctl enable accounts-daemon
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001349 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001350 system_ctl enable upower
Helmuthfdff0cb2013-08-12 14:41:31 -03001351 #Improvements
Helmuthd5f02092013-09-24 09:42:23 -03001352 add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001353 ;;
1354 #}}}
1355 4)
1356 #KDE {{{
1357 print_title "KDE - https://wiki.archlinux.org/index.php/KDE"
1358 print_info "KDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems. It is known for its Plasma Desktop, a desktop environment provided as the default working environment on many Linux distributions."
1359 kde_install=("Full install" "Minimal install");
1360 PS3="$prompt1"
1361 echo -e "Select kde installation: \n"
1362 select OPT in "${kde_install[@]}"; do
1363 case "$REPLY" in
1364 1)
1365 package_install "kde phonon-gstreamer kde-l10n-$LOCALE_KDE kipi-plugins"
Helmuth19c9e392013-08-30 15:08:47 -03001366 package_remove "kdemultimedia-kscd kdemultimedia-juk kdebase-kwrite kdenetwork-kopete kdebase-konqueror"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001367 package_install "kde-telepathy telepathy"
1368 break
1369 ;;
1370 2)
1371 package_install "kdebase phonon-gstreamer kde-l10n-$LOCALE_KDE"
1372 break
1373 ;;
1374 *)
1375 invalid_option
1376 ;;
1377 esac
1378 done
1379 package_install "xdg-user-dirs"
1380 aur_package_install "kde-gtk-config"
1381 aur_package_install "oxygen-gtk2 oxygen-gtk3 qtcurve-gtk2 qtcurve-kde4"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001382 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001383 config_xinitrc "startkde"
1384 pause_function
1385 #QTCURVE THEMES #{{{
1386 curl -o Sweet.tar.gz http://kde-look.org/CONTENT/content-files/144205-Sweet.tar.gz
1387 curl -o Kawai.tar.gz http://kde-look.org/CONTENT/content-files/141920-Kawai.tar.gz
1388 tar zxvf Sweet.tar.gz
1389 tar zxvf Kawai.tar.gz
1390 rm Sweet.tar.gz
1391 rm Kawai.tar.gz
1392 mkdir -p /home/${USER_NAME}/.kde4/share/apps/color-schemes
Helmuth Saatkamp7d138132013-05-11 08:08:00 -03001393 mv Sweet/*.colors /home/${USER_NAME}/.kde4/share/apps/color-schemes
1394 mv Kawai/*.colors /home/${USER_NAME}/.kde4/share/apps/color-schemes
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001395 mkdir -p /home/${USER_NAME}/.kde4/share/apps/QtCurve
1396 mv Sweet/Sweet.qtcurve /home/${USER_NAME}/.kde4/share/apps/QtCurve
1397 mv Kawai/Kawai.qtcurve /home/${USER_NAME}/.kde4/share/apps/QtCurve
1398 chown -R ${USER_NAME}:users /home/${USER_NAME}/.kde4
1399 rm -fr Kawai Sweet
1400 #}}}
1401 #KDE CUSTOMIZATION {{{
1402 while true
1403 do
1404 print_title "KDE CUSTOMIZATION"
1405 echo " 1) $(menu_item "apper")"
1406 echo " 2) $(menu_item "choqok")"
1407 echo " 3) $(menu_item "digikam")"
1408 echo " 4) $(menu_item "k3b")"
1409 echo " 5) $(menu_item "rosa-icons") $AUR"
1410 echo " 6) $(menu_item "caledonia-bundle") $AUR"
Helmuth2babebf2013-09-16 08:51:08 -03001411 echo " 7) $(menu_item "skrooge")"
1412 echo " 8) $(menu_item "yakuake")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001413 echo ""
1414 echo " d) DONE"
1415 echo ""
1416 KDE_OPTIONS+=" d"
1417 read_input_options "$KDE_OPTIONS"
1418 for OPT in ${OPTIONS[@]}; do
1419 case "$OPT" in
1420 1)
1421 package_install "apper"
1422 ;;
1423 2)
1424 package_install "choqok"
1425 ;;
1426 3)
1427 package_install "digikam"
1428 ;;
1429 4)
1430 package_install "k3b cdrdao dvd+rw-tools"
1431 ;;
1432 5)
1433 aur_package_install "rosa-icons"
1434 ;;
1435 6)
1436 aur_package_install "caledonia-bundle"
1437 ;;
1438 7)
Helmuth2babebf2013-09-16 08:51:08 -03001439 package_install "skrooge"
1440 ;;
1441 8)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001442 package_install "yakuake"
1443 aur_package_install "yakuake-skin-plasma-oxygen-panel"
1444 ;;
1445 "d")
1446 break
1447 ;;
1448 *)
1449 invalid_option
1450 ;;
1451 esac
1452 done
1453 elihw
1454 done
1455 #}}}
Helmuth1d4e6712013-08-14 11:04:23 -03001456 system_ctl enable kdm
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001457 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001458 system_ctl enable upower
Helmuth77932112013-08-09 14:03:39 -03001459 # Tweaks
1460 # nepomuk
Helmuthd5f02092013-09-24 09:42:23 -03001461 add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
Helmuth77932112013-08-09 14:03:39 -03001462 # pulseaudio
Helmuthd5f02092013-09-24 09:42:23 -03001463 add_line "load-module module-device-manager" "/etc/pulse/default.pa"
Helmuth77932112013-08-09 14:03:39 -03001464 # speed up application startup
1465 mkdir -p ~/.compose-cache
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001466 KDE=1
1467 ;;
1468 #}}}
1469 5)
1470 #LXDE {{{
1471 print_title "LXDE - http://wiki.archlinux.org/index.php/lxde"
1472 print_info "LXDE is a free and open source desktop environment for Unix and other POSIX compliant platforms, such as Linux or BSD. The goal of the project is to provide a desktop environment that is fast and energy efficient."
1473 package_install "lxde"
Helmuth Saatkampdb8fd202013-05-03 00:02:45 -03001474 package_install "gvfs upower"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001475 package_install "xdg-user-dirs"
1476 package_install "leafpad obconf epdfview"
1477 aur_package_install "gnome-defaults-list"
1478 mkdir -p /home/${USER_NAME}/.config/openbox/
Helmuth77932112013-08-09 14:03:39 -03001479 cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${USER_NAME}/.config/openbox/
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001480 chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001481 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001482 config_xinitrc "startlxde"
1483 pause_function
1484 install_misc_apps "LXDE"
1485 install_themes "LXDE"
1486 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001487 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001488 ;;
1489 #}}}
1490 6)
1491 #MATE {{{
1492 print_title "MATE - https://wiki.archlinux.org/index.php/Mate"
1493 print_info "The MATE Desktop Environment is a fork of GNOME 2 that aims to provide an attractive and intuitive desktop to Linux users using traditional metaphors."
Helmuthd5f02092013-09-24 09:42:23 -03001494 add_repository "mate" "http://repo.mate-desktop.org/archlinux/\$arch"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001495 package_install "mate mate-extras"
1496 package_install "gvfs"
1497 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001498 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001499 config_xinitrc "mate-session"
1500 pause_function
1501 install_themes "MATE"
1502 #D-Bus interface for user account query and manipulation
Helmuth1d4e6712013-08-14 11:04:23 -03001503 system_ctl enable accounts-daemon
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001504 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001505 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001506 ;;
1507 #}}}
1508 7)
1509 #XFCE {{{
1510 print_title "XFCE - https://wiki.archlinux.org/index.php/Xfce"
1511 print_info "Xfce is a free software desktop environment for Unix and Unix-like platforms, such as Linux, Solaris, and BSD. It aims to be fast and lightweight, while still being visually appealing and easy to use."
Helmuth77932112013-08-09 14:03:39 -03001512 package_install "xfce4 xfce4-goodies mupdf"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001513 package_install "gvfs"
1514 package_install "xdg-user-dirs"
1515 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001516 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001517 config_xinitrc "startxfce4"
1518 pause_function
1519 install_display_manager
1520 install_themes "XFCE"
1521 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001522 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001523 ;;
1524 #}}}
1525 8)
1526 #AWESOME {{{
1527 print_title "AWESOME - http://wiki.archlinux.org/index.php/Awesome"
1528 print_info "awesome is a highly configurable, next generation framework window manager for X. It is very fast, extensible and licensed under the GNU GPLv2 license."
1529 package_install "awesome"
1530 package_install "gvfs"
1531 package_install "lxappearance"
1532 package_install "leafpad epdfview nitrogen"
1533 package_install "ttf-bitstream-vera ttf-dejavu"
1534 aur_package_install "gnome-defaults-list"
Helmuth549d74a2013-10-03 08:26:57 -03001535 if [[ ! -d /home/${USER_NAME}/.config/awesome/ ]]; then
1536 mkdir -p /home/${USER_NAME}/.config/awesome/
1537 cp /etc/xdg/awesome/rc.lua /home/${USER_NAME}/.config/awesome/
1538 chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
1539 fi
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001540 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001541 config_xinitrc "awesome"
1542 pause_function
1543 install_misc_apps "AWESOME"
1544 install_themes "AWESOME"
1545 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001546 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001547 ;;
1548 #}}}
1549 9)
1550 #FLUXBOX {{{
1551 print_title "FLUXBOX - http://wiki.archlinux.org/index.php/Fluxbox"
1552 print_info "Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping."
1553 package_install "fluxbox menumaker"
1554 package_install "lxappearance"
1555 package_install "xdg-user-dirs"
1556 package_install "leafpad epdfview"
1557 package_install "ttf-bitstream-vera ttf-dejavu"
1558 aur_package_install "gnome-defaults-list"
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001559 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001560 config_xinitrc "startfluxbox"
1561 install_misc_apps "FLUXBOX"
1562 install_themes "FLUXBOX"
1563 pause_function
1564 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001565 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001566 ;;
1567 #}}}
1568 10)
1569 #OPENBOX {{{
1570 print_title "OPENBOX - http://wiki.archlinux.org/index.php/Openbox"
1571 print_info "Openbox is a lightweight and highly configurable window manager with extensive standards support."
1572 package_install "openbox obconf obmenu menumaker"
1573 package_install "lxappearance"
1574 package_install "xdg-user-dirs"
1575 package_install "leafpad epdfview nitrogen"
1576 package_install "ttf-bitstream-vera ttf-dejavu"
1577 aur_package_install "gnome-defaults-list"
1578 mkdir -p /home/${USER_NAME}/.config/openbox/
Helmuth77932112013-08-09 14:03:39 -03001579 cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${USER_NAME}/.config/openbox/
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001580 chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
Helmuth Saatkampf696d402013-06-03 11:28:54 -03001581 # config xinitrc
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001582 config_xinitrc "openbox-session"
1583 pause_function
1584 install_misc_apps "OPENBOX"
1585 install_themes "OPENBOX"
1586 #Abstraction for enumerating power devices, listening to device events and querying history and statistics
Helmuth1d4e6712013-08-14 11:04:23 -03001587 system_ctl enable upower
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001588 ;;
1589 #}}}
1590 "b")
1591 break
1592 ;;
1593 *)
1594 invalid_option
1595 ;;
1596 esac
Helmuth2f259c52013-07-18 15:47:19 -03001597 #MTP SUPPORT {{{
1598 if is_package_installed "libmtp" ; then
Helmuthd5f02092013-09-24 09:42:23 -03001599 [[ ${KDE} -eq 1 ]] && package_install "kio-mtp" || package_install "gvfs-mtp"
Helmuth2f259c52013-07-18 15:47:19 -03001600 fi
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001601 #}}}
1602}
1603#}}}
1604#CONNMAN/NETWORKMANAGER/WICD {{{
1605install_nm_wicd(){
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001606 print_title "NETWORK MANAGER"
1607 echo " 1) Networkmanager"
1608 echo " 2) Wicd"
1609 echo " 3) ConnMan"
1610 echo ""
1611 echo " n) NONE"
1612 echo ""
1613 read_input $NETWORKMANAGER
1614 case "$OPTION" in
1615 1)
1616 print_title "NETWORKMANAGER - https://wiki.archlinux.org/index.php/Networkmanager"
1617 print_info "NetworkManager is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks."
1618 if [[ ${KDE} -eq 1 ]]; then
1619 package_install "networkmanager dnsmasq kdeplasma-applets-networkmanagement"
1620 else
1621 package_install "networkmanager dnsmasq network-manager-applet"
1622 fi
1623 is_package_installed "ntp" && package_install "networkmanager-dispatcher-ntpd"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001624 # Network Management daemon
Helmuth1d4e6712013-08-14 11:04:23 -03001625 system_ctl enable NetworkManager
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001626 pause_function
1627 ;;
1628 2)
1629 print_title "WICD - https://wiki.archlinux.org/index.php/Wicd"
1630 print_info "Wicd is a network connection manager that can manage wireless and wired interfaces, similar and an alternative to NetworkManager."
1631 if [[ ${KDE} -eq 1 ]]; then
1632 aur_package_install "wicd wicd-kde"
1633 else
1634 package_install "wicd wicd-gtk"
1635 fi
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001636 # WICD daemon
Helmuth1d4e6712013-08-14 11:04:23 -03001637 system_ctl enable wicd
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001638 pause_function
1639 ;;
1640 3)
1641 print_title "CONNMAN - https://wiki.archlinux.org/index.php/Connman"
1642 print_info "ConnMan is an alternative to NetworkManager and Wicd and was created by Intel and the Moblin project for use with embedded devices."
1643 package_install "connman "
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001644 # ConnMan daemon
Helmuth1d4e6712013-08-14 11:04:23 -03001645 system_ctl enable connman
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001646 pause_function
1647 ;;
1648 esac
1649}
1650#}}}
1651#USB 3G MODEM {{{
1652install_usb_modem(){
1653 print_title "USB 3G MODEM - https://wiki.archlinux.org/index.php/USB_3G_Modem"
1654 print_info "A number of mobile telephone networks around the world offer mobile internet connections over UMTS (or EDGE or GSM) using a portable USB modem device."
1655 read_input_text "Install usb 3G modem support" $USBMODEM
1656 if [[ $OPTION == y ]]; then
1657 package_install "usbutils usb_modeswitch"
1658 is_package_installed "networkmanager" && package_install "modemmanager" || package_install "wvdial"
1659 pause_function
1660 fi
1661}
1662#}}}
1663#ACCESSORIES {{{
1664install_accessories_apps(){
1665 while true
1666 do
1667 print_title "ACCESSORIES APPS"
Helmuth4bacc7c2013-08-22 07:35:31 -03001668 echo " 1) $(menu_item "cairo-dock")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001669 echo " 2) $(menu_item "catfish")"
1670 echo " 3) $(menu_item "conky-lua") $AUR"
Helmuth4bacc7c2013-08-22 07:35:31 -03001671 echo " 4) $(menu_item "docky") $AUR"
1672 echo " 5) $(menu_item "galculator") $AUR"
1673 echo " 6) $(menu_item "terra-bzr") $AUR"
1674 echo " 7) $(menu_item "kupfer") $AUR"
1675 echo " 8) $(menu_item "pyrenamer") $AUR"
1676 echo " 9) $(menu_item "shutter") $AUR"
1677 echo "10) $(menu_item "stormcloud") $AUR"
1678 echo "11) $(menu_item "synapse")"
Helmuth Saatkamp616609b2013-04-30 22:23:14 -03001679 echo "12) $(menu_item "terminator")"
1680 echo "13) $(menu_item "zim")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001681 echo ""
1682 echo " b) BACK"
1683 echo ""
1684 ACCESSORIES_OPTIONS+=" b"
1685 read_input_options "$ACCESSORIES_OPTIONS"
1686 for OPT in ${OPTIONS[@]}; do
1687 case "$OPT" in
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -02001688 1)
Helmuth4bacc7c2013-08-22 07:35:31 -03001689 package_install "cairo-dock cairo-dock-plugins"
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -02001690 ;;
1691 2)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001692 package_install "catfish"
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -02001693 ;;
1694 3)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001695 aur_package_install "conky-lua"
1696 ;;
1697 4)
Helmuth4bacc7c2013-08-22 07:35:31 -03001698 package_install "docky"
1699 aur_package_install "dockmanager"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001700 ;;
Helmuth Saatkamp616609b2013-04-30 22:23:14 -03001701 5)
Helmuth4bacc7c2013-08-22 07:35:31 -03001702 package_install "galculator"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001703 ;;
Helmuth Saatkamp616609b2013-04-30 22:23:14 -03001704 6)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001705 aur_package_install "terra-bzr"
1706 ;;
Helmuth4bacc7c2013-08-22 07:35:31 -03001707 7)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001708 aur_package_install "kupfer"
1709 ;;
Helmuth4bacc7c2013-08-22 07:35:31 -03001710 8)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001711 aur_package_install "pyrenamer"
1712 ;;
Helmuth4bacc7c2013-08-22 07:35:31 -03001713 9)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001714 aur_package_install "shutter"
1715 ;;
Helmuth4bacc7c2013-08-22 07:35:31 -03001716 10)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001717 aur_package_install "stormcloud"
1718 ;;
Helmuth4bacc7c2013-08-22 07:35:31 -03001719 11)
1720 package_install "synapse"
1721 ;;
Helmuth Saatkamp616609b2013-04-30 22:23:14 -03001722 12)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001723 package_install "terminator"
1724 ;;
Helmuth Saatkamp616609b2013-04-30 22:23:14 -03001725 13)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001726 package_install "zim"
1727 ;;
1728 "b")
Helmuth Saatkamp233fd7c2013-01-11 11:43:16 -02001729 break
1730 ;;
1731 *)
1732 invalid_option
1733 ;;
1734 esac
1735 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001736 elihw
1737 done
1738}
1739#}}}
1740#DEVELOPEMENT {{{
1741install_development_apps(){
1742 while true
1743 do
1744 print_title "DEVELOPMENT APPS"
1745 echo " 1) $(menu_item "aptana-studio") $AUR"
1746 echo " 2) $(menu_item "bluefish")"
1747 echo " 3) $(menu_item "eclipse")"
1748 echo " 4) $(menu_item "emacs")"
1749 echo " 5) $(menu_item "gvim")"
1750 echo " 6) $(menu_item "geany")"
1751 echo " 7) $(menu_item "intellij-idea-community-edition" "IntelliJ IDEA")"
1752 echo " 8) $(menu_item "kdevelop")"
Helmuth2f259c52013-07-18 15:47:19 -03001753 echo " 9) $(menu_item "lighttable") $AUR"
Helmuth53fb1452013-08-23 10:02:02 -03001754 echo "10) $(menu_item "monodevelop")"
1755 echo "11) $(menu_item "netbeans")"
1756 echo "12) $(menu_item "nodejs")"
1757 echo "13) $(menu_item "jdk7-openjdk" "OpenJDK")"
1758 echo "14) $(menu_item "jdk" "Oracle JDK") $AUR"
1759 echo "15) $(menu_item "qtcreator")"
1760 echo "16) $(menu_item "sublime-text" "Sublime Text") $AUR"
1761 echo "17) $(menu_item "gdb" "Debuggers")"
1762 echo "18) $(menu_item "mysql-workbench-gpl" "MySQL Workbench") $AUR"
Helmuth3af354e2013-09-06 18:21:39 -03001763 echo "19) $(menu_item "dbschema") $AUR"
1764 echo "20) $(menu_item "meld")"
Helmuth Saatkampee7d2f52013-01-03 11:27:09 -02001765 echo ""
1766 echo " b) BACK"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001767 echo ""
1768 DEVELOPMENT_OPTIONS+=" b"
1769 read_input_options "$DEVELOPMENT_OPTIONS"
1770 for OPT in ${OPTIONS[@]}; do
1771 case "$OPT" in
1772 1)
1773 aur_package_install "aptana-studio"
1774 ;;
Helmuth Saatkampee7d2f52013-01-03 11:27:09 -02001775 2)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001776 package_install "bluefish"
1777 ;;
Helmuth Saatkampee7d2f52013-01-03 11:27:09 -02001778 3)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001779 #ECLIPSE {{{
1780 while true
1781 do
1782 print_title "ECLIPSE - https://wiki.archlinux.org/index.php/Eclipse"
1783 print_info "Eclipse is an open source community project, which aims to provide a universal development platform."
1784 echo " 1) $(menu_item "eclipse")"
1785 echo " 2) $(menu_item "eclipse-cdt" "Eclipse IDE for C/C++ Developers")"
1786 echo " 3) $(menu_item "eclipse-android" "Android Development Tools for Eclipse") $AUR"
1787 echo " 4) $(menu_item "eclipse-wtp-wst" "Web Development Tools for Eclipse") $AUR"
1788 echo " 5) $(menu_item "eclipse-pdt" "PHP Development Tools for Eclipse ") $AUR"
1789 echo " 6) $(menu_item "eclipse-pydev" "Python Development Tools for Eclipse") $AUR"
1790 echo " 7) $(menu_item "eclipse-aptana" "Aptana Studio plugin for Eclipse") $AUR"
1791 echo " 8) $(menu_item "eclipse-vrapper" "Vim-like editing plugin for Eclipse ") $AUR"
1792 echo " 9) $(menu_item "eclipse-egit" "Git support plugin for Eclipse") $AUR"
1793 echo "10) $(menu_item "eclipse-eclipsecolortheme" "Eclipse Colortheme") $AUR"
1794 echo ""
1795 echo " b) BACK"
1796 echo ""
1797 ECLIPSE_OPTIONS+=" b"
1798 read_input_options "$ECLIPSE_OPTIONS"
1799 for OPT in ${OPTIONS[@]}; do
1800 case "$OPT" in
1801 1)
1802 package_install "eclipse"
1803 ;;
1804 2)
1805 package_install "eclipse-cdt"
1806 ;;
1807 3)
Helmuth05f37342013-09-04 16:41:16 -03001808 aur_package_install "android-sdk android-apktool android-sdk-build-tools android-sdk-platform-tools android-udev eclipse-android libmtp"
Helmuth Saatkampea064082013-06-24 11:25:20 -03001809 if [[ ${KDE} -eq 1 ]]; then
1810 package_install "kio-mtp"
1811 else
1812 package_install "gvfs-mtp"
1813 fi
Helmuth2f259c52013-07-18 15:47:19 -03001814 aur_package_install "simple-mtpfs"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001815 groupadd android
1816 add_user_to_group ${USER_NAME} android
1817 add_user_to_group ${USER_NAME} adbusers
1818 chgrp -R android /opt/android-sdk
1819 chmod -R g+w /opt/android-sdk
1820 find /opt/android-sdk -type d -exec chmod g+s {} \;
1821 ;;
1822 4)
1823 aur_package_install "eclipse-wtp-wst"
1824 ;;
1825 5)
1826 aur_package_install "eclipse-pdt"
1827 ;;
1828 6)
1829 aur_package_install "eclipse-pydev"
1830 ;;
1831 7)
1832 aur_package_install "eclipse-aptana"
1833 ;;
1834 8)
1835 aur_package_install "eclipse-vrapper"
1836 ;;
1837 9)
1838 aur_package_install "eclipse-egit"
1839 ;;
1840 10)
1841 aur_package_install "eclipse-eclipsecolortheme"
1842 ;;
1843 "b")
1844 break
1845 ;;
1846 *)
1847 invalid_option
1848 ;;
1849 esac
1850 done
1851 elihw
Helmuth Saatkamp1a596eb2012-11-07 10:40:04 -02001852 done
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001853 #}}}
1854 OPT=3
1855 ;;
1856 4)
1857 package_install "emacs"
1858 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001859 5)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001860 package_remove "vim"
1861 package_install "gvim ctags"
1862 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001863 6)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001864 package_install "geany"
1865 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001866 7)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001867 package_install "intellij-idea-community-edition"
1868 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001869 8)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001870 package_install "kdevelop"
1871 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001872 9)
Helmuth2f259c52013-07-18 15:47:19 -03001873 aur_package_install "lighttable"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001874 ;;
Helmuth Saatkamp7f0e13d2013-01-03 11:10:38 -02001875 10)
Helmuth53fb1452013-08-23 10:02:02 -03001876 package_install "monodevelop monodevelop-debugger-gdb"
Helmuth2f259c52013-07-18 15:47:19 -03001877 ;;
1878 11)
Helmuth53fb1452013-08-23 10:02:02 -03001879 package_install "netbeans"
1880 ;;
1881 12)
Helmuthfdff0cb2013-08-12 14:41:31 -03001882 package_install "nodejs"
1883 #NODEJS {{{
1884 while true
1885 do
1886 print_title "NODEJS - http://nodejs.org"
1887 print_info "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."
1888 echo " 1) backbone"
1889 echo " 2) coffee-script"
1890 echo " 3) express"
1891 echo " 4) grunt"
1892 echo " 5) jshint"
1893 echo " 6) jslint"
1894 echo " 7) less"
1895 echo " 8) markdown"
1896 echo " 9) mocha"
1897 echo "10) stylus"
1898 echo "11) uglify-js"
1899 echo "12) underscore"
1900 echo ""
1901 echo " b) BACK"
1902 echo ""
1903 NODEJS_OPTIONS+=" b"
1904 read_input_options "$NODEJS_OPTIONS"
1905 for OPT in ${OPTIONS[@]}; do
1906 case "$OPT" in
1907 1)
1908 npm_install "backbone"
1909 ;;
1910 2)
Helmuth Saatkamp63724402013-08-12 18:29:17 -03001911 npm_install "coffee-script"
Helmuthfdff0cb2013-08-12 14:41:31 -03001912 ;;
1913 3)
1914 npm_install "express"
1915 ;;
1916 4)
1917 npm_install "grunt"
1918 ;;
1919 5)
1920 npm_install "jshint"
1921 ;;
1922 6)
1923 npm_install "jslint"
1924 ;;
1925 7)
1926 npm_install "less"
1927 ;;
1928 8)
1929 npm_install "markdown"
1930 ;;
1931 9)
1932 npm_install "mocha"
1933 ;;
1934 10)
1935 npm_install "stylus"
1936 ;;
1937 11)
1938 npm_install "uglify-js"
1939 ;;
1940 12)
1941 npm_install "underscore"
1942 ;;
1943 "b")
1944 break
1945 ;;
1946 *)
1947 invalid_option
1948 ;;
1949 esac
1950 done
1951 elihw
1952 done
1953 #}}}
1954 OPT=11
1955 ;;
Helmuth53fb1452013-08-23 10:02:02 -03001956 13)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001957 package_remove "jdk"
1958 package_install "jdk7-openjdk icedtea-web-java7"
1959 ;;
Helmuth53fb1452013-08-23 10:02:02 -03001960 14)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001961 package_remove "jre7-openjdk"
1962 package_remove "jdk7-openjdk"
1963 aur_package_install "jdk"
1964 ;;
Helmuth53fb1452013-08-23 10:02:02 -03001965 15)
Helmutha218fd72013-08-23 14:49:20 -03001966 package_install "qtcreator"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001967 mkdir -p /home/${USER_NAME}/.config/Nokia/qtcreator/styles
1968 curl -o monokai.xml http://angrycoding.googlecode.com/svn/branches/qt-creator-monokai-theme/monokai.xml
1969 mv monokai.xml /home/${USER_NAME}/.config/Nokia/qtcreator/styles/
1970 chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
1971 ;;
Helmuth53fb1452013-08-23 10:02:02 -03001972 16)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001973 aur_package_install "sublime-text"
1974 ;;
Helmuth53fb1452013-08-23 10:02:02 -03001975 17)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001976 package_install "splint valgrind gdb" #C/C++
1977 aur_package_install "php-codesniffer php-tidy" #PHP
Helmuthfdff0cb2013-08-12 14:41:31 -03001978 aur_package_install "closure-compiler" #Javascript
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001979 aur_package_install "tidyhtml" #HTML
1980 ;;
Helmuthfdff0cb2013-08-12 14:41:31 -03001981 18)
Helmuth53fb1452013-08-23 10:02:02 -03001982 aur_package_install "mysql-workbench-gpl"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001983 ;;
Helmuthfdff0cb2013-08-12 14:41:31 -03001984 19)
Helmuth3af354e2013-09-06 18:21:39 -03001985 aur_package_install "dbschema"
1986 ;;
1987 20)
Helmuth Saatkamp425ff022013-06-03 16:03:54 -03001988 package_install "meld"
1989 ;;
Helmuth Saatkampee7d2f52013-01-03 11:27:09 -02001990 "b")
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03001991 break
1992 ;;
1993 *)
1994 invalid_option
1995 ;;
1996 esac
1997 done
1998 elihw
1999 done
2000}
2001#}}}
2002#OFFICE {{{
2003install_office_apps(){
2004 while true
2005 do
2006 print_title "OFFICE APPS"
2007 echo " 1) $(menu_item "libreoffice-common" "LibreOffice")"
2008 echo " 2) $(menu_item "goffice calligra" "$([[ ${KDE} -eq 1 ]] && echo "Caligra" || echo "Abiword + Gnumeric";)")"
2009 echo " 3) $(menu_item "texlive-core" "latex")"
2010 echo " 4) $(menu_item "calibre")"
Helmuth4f5755e2013-08-14 12:43:23 -03002011 echo " 5) $(menu_item "everpad") $AUR"
2012 echo " 6) $(menu_item "gcstar")"
2013 echo " 7) $(menu_item "homebank")"
2014 echo " 8) $(menu_item "impressive")"
2015 echo " 9) $(menu_item "nitrotasks") $AUR"
2016 echo "10) $(menu_item "ocrfeeder")"
2017 echo "11) $(menu_item "uberwriter") $AUR"
2018 echo "12) $(menu_item "xmind") $AUR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002019 echo ""
2020 echo " b) BACK"
2021 echo ""
2022 OFFICE_OPTIONS+=" b"
2023 read_input_options "$OFFICE_OPTIONS"
2024 for OPT in ${OPTIONS[@]}; do
2025 case "$OPT" in
2026 1)
2027 print_title "LIBREOFFICE - https://wiki.archlinux.org/index.php/LibreOffice"
2028 package_install "libreoffice-$LOCALE_LO libreoffice-common libreoffice-base libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-math libreoffice-writer"
2029 aur_package_install "hunspell-$LOCALE_HS"
2030 aur_package_install "aspell-$LOCALE_AS"
Helmuthd5f02092013-09-24 09:42:23 -03002031 [[ ${KDE} -eq 1 ]] && package_install "libreoffice-kde4" || package_install "libreoffice-gnome"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002032 ;;
2033 2)
2034 if [[ ${KDE} -eq 1 ]]; then
2035 package_install "calligra"
2036 else
2037 package_install "gnumeric abiword abiword-plugins"
2038 fi
2039 aur_package_install "hunspell-$LOCALE_HS"
2040 aur_package_install "aspell-$LOCALE_AS"
2041 ;;
2042 3)
2043 package_install "texlive-most"
2044 if [[ $LOCALE == pt_BR ]]; then
2045 aur_package_install "abntex"
2046 fi
2047 read_input_text "Install texmaker?"
2048 [[ $OPTION == y ]] && aur_package_install "texmaker"
2049 ;;
2050 4)
2051 package_install "calibre"
2052 ;;
2053 5)
Helmuth4f5755e2013-08-14 12:43:23 -03002054 package_install "everpad"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002055 ;;
2056 6)
Helmuth4f5755e2013-08-14 12:43:23 -03002057 package_install "gcstar"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002058 ;;
2059 7)
Helmuth4f5755e2013-08-14 12:43:23 -03002060 package_install "homebank"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002061 ;;
2062 8)
Helmuth4f5755e2013-08-14 12:43:23 -03002063 package_install "impressive"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002064 ;;
2065 9)
Helmuth4f5755e2013-08-14 12:43:23 -03002066 aur_package_install "nitrotasks"
2067 ;;
2068 10)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002069 package_install "ocrfeeder tesseract gocr"
2070 aur_package_install "aspell-$LOCALE_AS"
2071 ;;
Helmuth4f5755e2013-08-14 12:43:23 -03002072 11)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002073 aur_package_install "uberwriter"
2074 ;;
Helmuth4f5755e2013-08-14 12:43:23 -03002075 12)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002076 aur_package_install "xmind"
2077 ;;
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002078 "b")
2079 break
2080 ;;
2081 *)
2082 invalid_option
2083 ;;
2084 esac
2085 done
2086 elihw
2087 done
2088}
2089#}}}
2090#SYSTEM TOOLS {{{
2091install_system_apps(){
2092 while true
2093 do
2094 print_title "SYSTEM TOOLS APPS"
2095 echo " 1) $(menu_item "clamav")"
Helmuth Saatkamp78d98332013-05-03 07:00:49 -03002096 echo " 2) $(menu_item "firewalld")"
Helmuthacfba112013-09-20 14:32:21 -03002097 echo " 3) $(menu_item "ufw")"
2098 echo " 4) $(menu_item "gparted")"
2099 echo " 5) $(menu_item "grsync")"
2100 echo " 6) $(menu_item "htop")"
2101 echo " 7) $(menu_item "virtualbox")"
2102 echo " 8) $(menu_item "webmin")"
2103 echo " 9) $(menu_item "wine")"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002104 echo ""
2105 echo " b) BACK"
2106 echo ""
2107 SYSTEMTOOLS_OPTIONS+=" b"
2108 read_input_options "$SYSTEMTOOLS_OPTIONS"
2109 for OPT in ${OPTIONS[@]}; do
2110 case "$OPT" in
2111 1)
2112 package_install "clamav"
Helmuth Saatkampa37f9c32013-05-22 23:28:38 -03002113 sed -i '/Example/d' /etc/clamav/freshclam.conf
2114 sed -i '/Example/d' /etc/clamav/clamd.conf
Helmuth1d4e6712013-08-14 11:04:23 -03002115 system_ctl enable clamd
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002116 freshclam
2117 ;;
2118 2)
Helmuth Saatkamp78d98332013-05-03 07:00:49 -03002119 print_title "FirewallD - https://fedoraproject.org/wiki/FirewallD"
2120 print_info "firewalld provides a dynamically managed firewall with support for network/firewall zones to define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings and for ethernet bridges and has a separation of runtime and persistent configuration options. It also supports an interface fors or applications to add firewall rules directly."
2121 is_package_installed "ufw" && package_remove "ufw"
Helmuthacfba112013-09-20 14:32:21 -03002122 is_package_installed "firewalld" && package_remove "firewalld"
Helmuth Saatkamp78d98332013-05-03 07:00:49 -03002123 package_install "firewalld"
Helmuth1d4e6712013-08-14 11:04:23 -03002124 system_ctl enable firewalld
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002125 ;;
2126 3)
Helmuthacfba112013-09-20 14:32:21 -03002127 print_title "UFW - https://wiki.archlinux.org/index.php/Ufw"
2128 print_info "Ufw stands for Uncomplicated Firewall, and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use."
2129 is_package_installed "ufw" && package_remove "ufw"
2130 aur_package_install "ufw gufw"
2131 system_ctl enable ufw
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002132 ;;
2133 4)
Helmuthacfba112013-09-20 14:32:21 -03002134 package_install "gparted"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002135 ;;
2136 5)
Helmuthacfba112013-09-20 14:32:21 -03002137 package_install "grsync"
Helmuth Saatkamp78d98332013-05-03 07:00:49 -03002138 ;;
2139 6)
Helmuthacfba112013-09-20 14:32:21 -03002140 package_install "htop"
2141 ;;
2142 7)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002143 #Make sure we are not a VirtualBox Guest
2144 VIRTUALBOX_GUEST=`dmidecode --type 1 | grep VirtualBox`
2145 if [[ -z ${VIRTUALBOX_GUEST} ]]; then
2146 package_install "virtualbox virtualbox-host-modules virtualbox-guest-iso"
2147 aur_package_install "virtualbox-ext-oracle"
Helmuth Saatkamp889ffa02013-06-11 14:51:43 -03002148 add_module "vboxdrv vboxnetflt" "virtualbox-host"
2149 modprobe vboxdrv vboxnetflt
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002150 add_user_to_group ${USER_NAME} vboxusers
2151 else
Helmuth Saatkamp6539d952013-04-29 22:34:09 -03002152 cecho " ${BBlue}[${Reset}${Bold}!${BBlue}]${Reset} VirtualBox was not installed as we are a VirtualBox guest."
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002153 fi
2154 ;;
Helmuthacfba112013-09-20 14:32:21 -03002155 8)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002156 package_install "webmin perl-net-ssleay"
Helmuth1d4e6712013-08-14 11:04:23 -03002157 system_ctl enable webmin
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002158 ;;
Helmuthacfba112013-09-20 14:32:21 -03002159 9)
Helmuthad0a3752013-09-19 08:48:11 -03002160 package_install "icoutils wine wine_gecko wine-mono winetricks"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002161 ;;
2162 "b")
2163 break
2164 ;;
2165 *)
2166 invalid_option
2167 ;;
2168 esac
2169 done
2170 elihw
2171 done
2172}
2173#}}}
2174#GRAPHICS {{{
2175install_graphics_apps(){
2176 while true
2177 do
2178 print_title "GRAPHICS APPS"
2179 echo " 1) $(menu_item "blender")"
2180 echo " 2) $(menu_item "gimp")"
2181 echo " 3) $(menu_item "gradiator")"
2182 echo " 4) $(menu_item "gthumb")"
2183 echo " 5) $(menu_item "inkscape")"
2184 echo " 6) $(menu_item "mcomix")"
2185 echo " 7) $(menu_item "mypaint")"
Affif Mukhlashin27563912013-05-27 19:30:20 +07002186 echo " 8) $(menu_item "pencil") [Prototyping Tool] $AUR"
Helmuth Saatkamp3c4416d2013-05-23 15:20:51 -03002187 echo " 9) $(menu_item "scribus")"
2188 echo "10) $(menu_item "shotwell")"
2189 echo "11) $(menu_item "simple-scan")"
2190 echo "12) $(menu_item "xnviewmp") $AUR"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002191 echo ""
2192 echo " b) BACK"
2193 echo ""
2194 GRAPHICS_OPTIONS+=" b"
2195 read_input_options "$GRAPHICS_OPTIONS"
2196 for OPT in ${OPTIONS[@]}; do
2197 case "$OPT" in
2198 1)
2199 package_install "blender"
2200 ;;
2201 2)
2202 package_install "gimp"
2203 aur_package_install "gimphelp-scriptfu gimp-paint-studio gimpfx-foundry"
2204 ;;
2205 3)
2206 aur_package_install "gradiator"
2207 ;;
2208 4)
2209 package_install "gthumb"
2210 ;;
2211 5)
2212 package_install "inkscape python2-numpy python-lxml"
2213 aur_package_install "sozi"
2214 ;;
2215 6)
2216 package_install "mcomix"
2217 ;;
2218 7)
2219 package_install "mypaint"
2220 ;;
2221 8)
Helmuth Saatkamp3c4416d2013-05-23 15:20:51 -03002222 aur_package_install "pencil"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002223 ;;
2224 9)
Helmuth Saatkamp3c4416d2013-05-23 15:20:51 -03002225 package_install "scribus"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002226 ;;
2227 10)
Helmuth Saatkamp3c4416d2013-05-23 15:20:51 -03002228 package_install "shotwell"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002229 ;;
2230 11)
Helmuth Saatkamp3c4416d2013-05-23 15:20:51 -03002231 package_install "simple-scan"
2232 ;;
2233 12)
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002234 aur_package_install "xnviewmp"
2235 ;;
2236 "b")
2237 break
2238 ;;
2239 *)
2240 invalid_option
2241 ;;
2242 esac
2243 done
2244 elihw
2245 done
2246}
2247#}}}
2248#INTERNET {{{
2249install_internet_apps(){
2250 while true
2251 do
2252 print_title "INTERNET APPS"
2253 echo " 1) Browser"
2254 echo " 2) Download|Fileshare"
2255 echo " 3) Email|RSS"
Helmuth02c8d402013-09-16 08:44:57 -03002256 echo " 4) Instant Messaging|IRC"
2257 echo " 5) Mapping Tools"
2258 echo " 6) VNC|Desktop Share"
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002259 echo ""
2260 echo " b) BACK"
2261 echo ""
2262 INTERNET_OPTIONS+=" b"
2263 read_input_options "$INTERNET_OPTIONS"
2264 for OPT in ${OPTIONS[@]}; do
2265 case "$OPT" in
2266 1)
2267 #BROWSER {{{
Helmuth Saatkamp7d3a37f2013-04-24 10:51:46 -03002268 while true
2269 do
2270 print_title "BROWSER"
2271 echo " 1) $(menu_item "chromium")"
2272 echo " 2) $(menu_item "google-chrome") $AUR"
2273 echo " 3) $(menu_item "rekonq midori" "$([[ ${KDE} -eq 1 ]] && echo "Rekonq" || echo "Midori";)")"
2274 echo " 4) $(menu_item "firefox")"
2275 echo " 5) $(menu_item "opera")"
2276 echo ""
2277 echo " b) BACK"
2278 echo ""
2279 BROWSERS_OPTIONS+=" b"
2280 read_input_options "$BROWSERS_OPTIONS"
2281 for OPT in ${OPTIONS[@]}; do
2282 case