Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 107.26 KB | None | 0 0
  1. if [[ -f `pwd`/sharedfuncs ]]; then
  2. source sharedfuncs
  3. else
  4. echo "missing file: sharedfuncs"
  5. exit 1
  6. fi
  7.  
  8. #ARCHLINUX U INSTALL {{{
  9. #WELCOME {{{
  10. welcome(){
  11. clear
  12. echo -e "${Bold}Welcome to the Archlinux U Install script by helmuthdu${White}"
  13. print_line
  14. echo "Requirements:"
  15. echo "-> Archlinux installation"
  16. echo "-> Run script as root user"
  17. echo "-> Working internet connection"
  18. print_line
  19. echo "Script can be cancelled at any time with CTRL+C"
  20. print_line
  21. echo "http://www.github.com/helmuthdu/aui"
  22. print_line
  23. echo -e "\nBackups:"
  24. print_line
  25. # backup old configs
  26. [[ ! -f /etc/pacman.conf.aui ]] && cp -v /etc/pacman.conf /etc/pacman.conf.aui || echo "/etc/pacman.conf.aui";
  27. [[ -f /etc/ssh/sshd_config.aui ]] && echo "/etc/ssh/sshd_conf.aui";
  28. [[ -f /etc/sudoers.aui ]] && echo "/etc/sudoers.aui";
  29. pause_function
  30. echo ""
  31. }
  32. #}}}
  33. #LOCALE SELECTOR {{{
  34. language_selector(){
  35. #AUTOMATICALLY DETECTS THE SYSTEM LOCALE {{{
  36. #automatically detects the system language based on your locale
  37. LOCALE=`locale | grep LANG | sed 's/LANG=//' | cut -c1-5`
  38. #KDE #{{{
  39. if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
  40. LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
  41. else
  42. LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
  43. fi
  44. #}}}
  45. #FIREFOX #{{{
  46. 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
  47. LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  48. else
  49. LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
  50. fi
  51. #}}}
  52. #THUNDERBIRD #{{{
  53. if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
  54. LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  55. elif [[ $LOCALE == es_CL ]]; then
  56. LOCALE_TB="es-es"
  57. else
  58. LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
  59. fi
  60. #}}}
  61. #HUNSPELL #{{{
  62. if [[ $LOCALE == pt_BR ]]; then
  63. LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  64. elif [[ $LOCALE == pt_PT ]]; then
  65. LOCALE_HS="pt_pt"
  66. else
  67. LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
  68. fi
  69. #}}}
  70. #ASPELL #{{{
  71. LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
  72. #}}}
  73. #LIBREOFFICE #{{{
  74. if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
  75. LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
  76. else
  77. LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
  78. fi
  79. #}}}
  80. #}}}
  81. print_title "LOCALE - https://wiki.archlinux.org/index.php/Locale"
  82. 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."
  83. read -p "Default system language: \"$LOCALE\" [Y/n]: " OPTION
  84. case "$OPTION" in
  85. "n")
  86. while [[ $OPTION != y ]]; do
  87. setlocale
  88. read_input_text "Confirm locale ($LOCALE)"
  89. done
  90. sed -i '/'${LOCALE}'/s/^#//' /etc/locale.gen
  91. locale-gen
  92. localectl set-locale LANG=${LOCALE_UTF8}
  93. #KDE #{{{
  94. if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
  95. LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
  96. else
  97. LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
  98. fi
  99. #}}}
  100. #FIREFOX #{{{
  101. 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
  102. LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  103. else
  104. LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
  105. fi
  106. #}}}
  107. #THUNDERBIRD #{{{
  108. if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
  109. LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  110. elif [[ $LOCALE == es_CL ]]; then
  111. LOCALE_TB="es-es"
  112. else
  113. LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
  114. fi
  115. #}}}
  116. #HUNSPELL #{{{
  117. if [[ $LOCALE == pt_BR ]]; then
  118. LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
  119. elif [[ $LOCALE == pt_PT ]]; then
  120. LOCALE_HS="pt_pt"
  121. else
  122. LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
  123. fi
  124. #}}}
  125. #ASPELL #{{{
  126. LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
  127. #}}}
  128. #LIBREOFFICE #{{{
  129. if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
  130. LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
  131. else
  132. LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
  133. fi
  134. #}}}
  135. ;;
  136. *)
  137. ;;
  138. esac
  139. }
  140. #}}}
  141. #SELECT/CREATE USER {{{
  142. select_user(){
  143. #CREATE NEW USER {{{
  144. create_new_user(){
  145. read -p "Username: " username
  146. username=`echo $username | tr '[:upper:]' '[:lower:]'`
  147. useradd -m -g users -G wheel -s /bin/bash ${username}
  148. chfn ${username}
  149. passwd ${username}
  150. while [[ $? -ne 0 ]]; do
  151. passwd ${username}
  152. done
  153. pause_function
  154. configure_user_account
  155. }
  156. #}}}
  157. #CONFIGURE USER ACCOUNT {{{
  158. configure_user_account(){
  159. #BASHRC {{{
  160. print_title "BASHRC - https://wiki.archlinux.org/index.php/Bashrc"
  161. bashrc_list=("Get helmuthdu .bashrc from github" "Vanilla .bashrc" "Get personal .bashrc from github");
  162. PS3="$prompt1"
  163. echo -e "Choose your .bashrc\n"
  164. select OPT in "${bashrc_list[@]}"; do
  165. case "$REPLY" in
  166. 1)
  167. package_install "git"
  168. package_install "colordiff"
  169. git clone https://github.com/helmuthdu/dotfiles
  170. cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc dotfiles/.yaourtrc ~/
  171. cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc dotfiles/.yaourtrc /home/${username}/
  172. rm -fr dotfiles
  173. ;;
  174. 2)
  175. cp /etc/skel/.bashrc /home/${username}
  176. ;;
  177. 3)
  178. package_install "git"
  179. read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
  180. read -p "Enter your github repository [ex: aui]: " GITHUB_REPO
  181. git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
  182. cp -R $GITHUB_REPO/.* /home/${username}/
  183. rm -fr $GITHUB_REPO
  184. ;;
  185. *)
  186. invalid_option
  187. ;;
  188. esac
  189. [[ -n $OPT ]] && break
  190. done
  191. #}}}
  192. #EDITOR {{{
  193. print_title "DEFAULT EDITOR"
  194. editors_list=("emacs" "nano" "vi" "vim" "neovim" "zile");
  195. PS3="$prompt1"
  196. echo -e "Select editor\n"
  197. select EDITOR in "${editors_list[@]}"; do
  198. if contains_element "$EDITOR" "${editors_list[@]}"; then
  199. if [[ $EDITOR == vim || $EDITOR == neovim ]]; then
  200. [[ $EDITOR == vim ]] && (! is_package_installed "gvim" && package_install "vim ctags") || package_install "neovim python2-neovim python-neovim xclip"
  201. #VIMRC {{{
  202. if [[ ! -f /home/${username}/.vimrc ]]; then
  203. vimrc_list=("Get helmuthdu .vimrc from github" "Vanilla .vimrc" "Get personal .vimrc from github");
  204. PS3="$prompt1"
  205. echo -e "Choose your .vimrc\n"
  206. select OPT in "${vimrc_list[@]}"; do
  207. case "$REPLY" in
  208. 1)
  209. package_install "git"
  210. git clone https://github.com/helmuthdu/vim /home/${username}/.vim
  211. ln -sf /home/${username}/.vim/vimrc /home/${username}/.vimrc
  212. cp -R vim /home/${username}/.vim/fonts /home/${username}/.fonts
  213. GRUVBOX_NEEDED=1
  214. ;;
  215. 3)
  216. package_install "git"
  217. read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
  218. read -p "Enter your github repository [ex: vim]: " GITHUB_REPO
  219. git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
  220. cp -R $GITHUB_REPO/.vim /home/${username}/
  221. if [[ -f $GITHUB_REPO/vimrc ]]; then
  222. ln -sf /home/${username}/.vim/vimrc /home/${username}/.vimrc
  223. else
  224. ln -sf /home/${username}/.vim/.vimrc /home/${username}/.vimrc
  225. fi
  226. rm -fr $GITHUB_REPO
  227. ;;
  228. 2)
  229. echo "Nothing to do..."
  230. ;;
  231. *)
  232. invalid_option
  233. ;;
  234. esac
  235. [[ -n $OPT ]] && break
  236. done
  237. fi
  238. if [[ $EDITOR == neovim && ! -f /home/${username}/.config/nvim ]]; then
  239. mkdir ~/.config
  240. ln -s ~/.vim ~/.config/nvim
  241. ln -s ~/.vimrc ~/.config/nvim/init.vim
  242. fi
  243. #}}}
  244. else
  245. package_install "$EDITOR"
  246. fi
  247. break
  248. else
  249. invalid_option
  250. fi
  251. done
  252. #}}}
  253. chown -R ${username}:users /home/${username}
  254. }
  255. #}}}
  256. print_title "SELECT/CREATE USER - https://wiki.archlinux.org/index.php/Users_and_Groups"
  257. users_list=(`cat /etc/passwd | grep "/home" | cut -d: -f1`);
  258. PS3="$prompt1"
  259. echo "Avaliable Users:"
  260. if [[ $(( ${#users_list[@]} )) -gt 0 ]]; then
  261. print_warning "WARNING: THE SELECTED USER MUST HAVE SUDO PRIVILEGES"
  262. else
  263. echo ""
  264. fi
  265. select OPT in "${users_list[@]}" "Create new user"; do
  266. if [[ $OPT == "Create new user" ]]; then
  267. create_new_user
  268. elif contains_element "$OPT" "${users_list[@]}"; then
  269. username=$OPT
  270. else
  271. invalid_option
  272. fi
  273. [[ -n $OPT ]] && break
  274. done
  275. [[ ! -f /home/${username}/.bashrc ]] && configure_user_account;
  276. if [[ -n "$http_proxy" ]]; then
  277. echo "proxy = $http_proxy" > /home/${username}/.curlrc
  278. chown ${username}:users /home/${username}/.curlrc
  279. fi
  280. }
  281. #}}}
  282. #CONFIGURE SUDO {{{
  283. configure_sudo(){
  284. if ! is_package_installed "sudo" ; then
  285. print_title "SUDO - https://wiki.archlinux.org/index.php/Sudo"
  286. package_install "sudo"
  287. fi
  288. #CONFIGURE SUDOERS {{{
  289. if [[ ! -f /etc/sudoers.aui ]]; then
  290. cp -v /etc/sudoers /etc/sudoers.aui
  291. ## Uncomment to allow members of group wheel to execute any command
  292. sed -i '/%wheel ALL=(ALL) ALL/s/^#//' /etc/sudoers
  293. ## Same thing without a password (not secure)
  294. #sed -i '/%wheel ALL=(ALL) NOPASSWD: ALL/s/^#//' /etc/sudoers
  295.  
  296. #This config is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:
  297. echo "" >> /etc/sudoers
  298. echo 'Defaults !requiretty, !tty_tickets, !umask' >> /etc/sudoers
  299. echo 'Defaults visiblepw, path_info, insults, lecture=always' >> /etc/sudoers
  300. echo 'Defaults loglinelen=0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth' >> /etc/sudoers
  301. echo 'Defaults passwd_tries=3, passwd_timeout=1' >> /etc/sudoers
  302. echo 'Defaults env_reset, always_set_home, set_home, set_logname' >> /etc/sudoers
  303. echo 'Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"' >> /etc/sudoers
  304. echo 'Defaults timestamp_timeout=15' >> /etc/sudoers
  305. echo 'Defaults passprompt="[sudo] password for %u: "' >> /etc/sudoers
  306. echo 'Defaults lecture=never' >> /etc/sudoers
  307. fi
  308. #}}}
  309. }
  310. #}}}
  311. #AUR HELPER {{{
  312. choose_aurhelper(){
  313. print_title "AUR HELPER - https://wiki.archlinux.org/index.php/AUR_Helpers"
  314. print_info "AUR Helpers are written to make using the Arch User Repository more comfortable."
  315. print_warning "\tNone of these tools are officially supported by Arch devs."
  316. aurhelper=("trizen" "yay")
  317. PS3="$prompt1"
  318. echo -e "Choose your default AUR helper to install\n"
  319. select OPT in "${aurhelper[@]}"; do
  320. case "$REPLY" in
  321. 1)
  322. if ! is_package_installed "trizen" ; then
  323. package_install "base-devel git perl"
  324. aui_download_packages "trizen"
  325. if ! is_package_installed "trizen" ; then
  326. echo "trizen not installed. EXIT now"
  327. pause_function
  328. exit 0
  329. fi
  330. fi
  331. AUR_PKG_MANAGER="trizen"
  332. ;;
  333. 2)
  334. if ! is_package_installed "yay" ; then
  335. package_install "base-devel git go"
  336. pacman -D --asdeps go
  337. aui_download_packages "yay"
  338. if ! is_package_installed "yay" ; then
  339. echo "yay not installed. EXIT now"
  340. pause_function
  341. exit 0
  342. fi
  343. fi
  344. AUR_PKG_MANAGER="yay"
  345. ;;
  346. *)
  347. invalid_option
  348. ;;
  349. esac
  350. [[ -n $OPT ]] && break
  351. done
  352. pause_function
  353. }
  354. #}}}
  355. #AUTOMODE {{{
  356. automatic_mode(){
  357. print_title "AUTOMODE"
  358. print_info "Create a custom install with all options pre-selected.\nUse this option with care."
  359. print_danger "\tUse this mode only if you already know all the option.\n\tYou won't be able to select anything later."
  360. read_input_text "Enable Automatic Mode"
  361. if [[ $OPTION == y ]]; then
  362. $EDITOR ${AUI_DIR}/lilo.automode
  363. source ${AUI_DIR}/lilo.automode
  364. echo -e "The installation will start now."
  365. pause_function
  366. AUTOMATIC_MODE=1
  367. fi
  368. }
  369. #}}}
  370. #CUSTOM REPOSITORIES {{{
  371. add_custom_repositories(){
  372. print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
  373. read_input_text "Add custom repositories" $CUSTOMREPO
  374. if [[ $OPTION == y ]]; then
  375. while true
  376. do
  377. print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
  378. echo " 1) \"Add new repository\""
  379. echo ""
  380. echo " d) DONE"
  381. echo ""
  382. read -p "$prompt1" OPTION
  383. case $OPTION in
  384. 1)
  385. read -p "Repository Name [ex: custom]: " repository_name
  386. read -p "Repository Address [ex: file:///media/backup/Archlinux]: " repository_addr
  387. add_repository "${repository_name}" "${repository_addr}" "Never"
  388. pause_function
  389. ;;
  390. "d")
  391. break
  392. ;;
  393. *)
  394. invalid_option
  395. ;;
  396. esac
  397. done
  398. fi
  399. }
  400. #}}}
  401. #BASIC SETUP {{{
  402. install_basic_setup(){
  403. print_title "BASH TOOLS - https://wiki.archlinux.org/index.php/Bash"
  404. package_install "bc rsync mlocate bash-completion pkgstats arch-wiki-lite"
  405. pause_function
  406. print_title "(UN)COMPRESS TOOLS - https://wiki.archlinux.org/index.php/P7zip"
  407. package_install "zip unzip unrar p7zip lzop cpio"
  408. pause_function
  409. print_title "AVAHI - https://wiki.archlinux.org/index.php/Avahi"
  410. 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 services and hosts running on a local network with no specific configuration."
  411. package_install "avahi nss-mdns"
  412. is_package_installed "avahi" && system_ctl enable avahi-daemon.service
  413. pause_function
  414. print_title "ALSA - https://wiki.archlinux.org/index.php/Alsa"
  415. 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."
  416. package_install "alsa-utils alsa-plugins"
  417. pause_function
  418. print_title "PULSEAUDIO - https://wiki.archlinux.org/index.php/Pulseaudio"
  419. 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"
  420. package_install "pulseaudio pulseaudio-alsa"
  421. pause_function
  422. print_title "NTFS/FAT/exFAT/F2FS - https://wiki.archlinux.org/index.php/File_Systems"
  423. 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."
  424. package_install "ntfs-3g dosfstools exfat-utils f2fs-tools fuse fuse-exfat autofs mtpfs"
  425. pause_function
  426. print_title "SYSTEMD-TIMESYNCD - https://wiki.archlinux.org/index.php/Systemd-timesyncd"
  427. 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."
  428. timedatectl set-ntp true
  429. pause_function
  430. }
  431. #}}}
  432. #SSH {{{
  433. install_ssh(){
  434. print_title "SSH - https://wiki.archlinux.org/index.php/Ssh"
  435. print_info "Secure Shell (SSH) is a network protocol that allows data to be exchanged over a secure channel between two computers."
  436. read_input_text "Install ssh" $SSH
  437. if [[ $OPTION == y ]]; then
  438. package_install "openssh"
  439. system_ctl enable sshd
  440. [[ ! -f /etc/ssh/sshd_config.aui ]] && cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config.aui;
  441. #CONFIGURE SSHD_CONF #{{{
  442. sed -i '/Port 22/s/^#//' /etc/ssh/sshd_config
  443. sed -i '/Protocol 2/s/^#//' /etc/ssh/sshd_config
  444. sed -i '/HostKey \/etc\/ssh\/ssh_host_rsa_key/s/^#//' /etc/ssh/sshd_config
  445. sed -i '/HostKey \/etc\/ssh\/ssh_host_dsa_key/s/^#//' /etc/ssh/sshd_config
  446. sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/s/^#//' /etc/ssh/sshd_config
  447. sed -i '/KeyRegenerationInterval/s/^#//' /etc/ssh/sshd_config
  448. sed -i '/ServerKeyBits/s/^#//' /etc/ssh/sshd_config
  449. sed -i '/SyslogFacility/s/^#//' /etc/ssh/sshd_config
  450. sed -i '/LogLevel/s/^#//' /etc/ssh/sshd_config
  451. sed -i '/LoginGraceTime/s/^#//' /etc/ssh/sshd_config
  452. sed -i '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
  453. sed -i '/HostbasedAuthentication no/s/^#//' /etc/ssh/sshd_config
  454. sed -i '/StrictModes/s/^#//' /etc/ssh/sshd_config
  455. sed -i '/RSAAuthentication/s/^#//' /etc/ssh/sshd_config
  456. sed -i '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
  457. sed -i '/IgnoreRhosts/s/^#//' /etc/ssh/sshd_config
  458. sed -i '/PermitEmptyPasswords/s/^#//' /etc/ssh/sshd_config
  459. sed -i '/AllowTcpForwarding/s/^#//' /etc/ssh/sshd_config
  460. sed -i '/AllowTcpForwarding no/d' /etc/ssh/sshd_config
  461. sed -i '/X11Forwarding/s/^#//' /etc/ssh/sshd_config
  462. sed -i '/X11Forwarding/s/no/yes/' /etc/ssh/sshd_config
  463. sed -i -e '/\tX11Forwarding yes/d' /etc/ssh/sshd_config
  464. sed -i '/X11DisplayOffset/s/^#//' /etc/ssh/sshd_config
  465. sed -i '/X11UseLocalhost/s/^#//' /etc/ssh/sshd_config
  466. sed -i '/PrintMotd/s/^#//' /etc/ssh/sshd_config
  467. sed -i '/PrintMotd/s/yes/no/' /etc/ssh/sshd_config
  468. sed -i '/PrintLastLog/s/^#//' /etc/ssh/sshd_config
  469. sed -i '/TCPKeepAlive/s/^#//' /etc/ssh/sshd_config
  470. sed -i '/the setting of/s/^/#/' /etc/ssh/sshd_config
  471. sed -i '/RhostsRSAAuthentication and HostbasedAuthentication/s/^/#/' /etc/ssh/sshd_config
  472. #}}}
  473. pause_function
  474. fi
  475. }
  476. #}}}
  477. #NFS {{{
  478. install_nfs(){
  479. print_title "NFS - https://wiki.archlinux.org/index.php/Nfs"
  480. 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."
  481. read_input_text "Install nfs" $NFS
  482. if [[ $OPTION == y ]]; then
  483. package_install "nfs-utils"
  484. system_ctl enable rpcbind
  485. system_ctl enable nfs-client.target
  486. system_ctl enable remote-fs.target
  487. pause_function
  488. fi
  489. }
  490. #}}}
  491. #ZSH {{{
  492. install_zsh(){
  493. print_title "ZSH - https://wiki.archlinux.org/index.php/Zsh"
  494. print_info "Zsh is a powerful shell that operates as both an interactive shell and as a scripting language interpreter. "
  495. read_input_text "Install zsh" $ZSH
  496. if [[ $OPTION == y ]]; then
  497. package_install "zsh"
  498. read_input_text "Install oh-my-zsh" $OH_MY_ZSH
  499. if [[ $OPTION == y ]]; then
  500. if [[ -f /home/${username}/.zshrc ]]; then
  501. read_input_text "Replace current .zshrc file"
  502. if [[ $OPTION == y ]]; then
  503. run_as_user "mv /home/${username}/.zshrc /home/${username}/.zshrc.bkp"
  504. run_as_user "sh -c \"$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)\""
  505. run_as_user "$EDITOR /home/${username}/.zshrc"
  506. fi
  507. else
  508. run_as_user "sh -c \"$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)\""
  509. run_as_user "$EDITOR /home/${username}/.zshrc"
  510. fi
  511. fi
  512. pause_function
  513. fi
  514. }
  515. #}}}
  516. #SAMBA {{{
  517. install_samba(){
  518. print_title "SAMBA - https://wiki.archlinux.org/index.php/Samba"
  519. 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."
  520. read_input_text "Install Samba" $SAMBA
  521. if [[ $OPTION == y ]]; then
  522. package_install "samba smbnetfs"
  523. [[ ! -f /etc/samba/smb.conf ]] && wget -q -O /etc/samba/smb.conf "https://git.samba.org/samba.git/?p=samba.git;a=blob_plain;f=examples/smb.conf.default;hb=HEAD"
  524. local CONFIG_SAMBA=`cat /etc/samba/smb.conf | grep usershare`
  525. if [[ -z $CONFIG_SAMBA ]]; then
  526. # configure usershare
  527. export USERSHARES_DIR="/var/lib/samba/usershare"
  528. export USERSHARES_GROUP="sambashare"
  529. mkdir -p ${USERSHARES_DIR}
  530. groupadd ${USERSHARES_GROUP}
  531. chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
  532. chmod 1770 ${USERSHARES_DIR}
  533. sed -i -e '/\[global\]/a\\n usershare path = /var/lib/samba/usershare\n usershare max shares = 100\n usershare allow guests = yes\n usershare owner only = False' /etc/samba/smb.conf
  534. sed -i -e '/\[global\]/a\\n socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE\n write cache size = 2097152\n use sendfile = yes\n' /etc/samba/smb.conf
  535. usermod -a -G ${USERSHARES_GROUP} ${username}
  536. sed -i '/user_allow_other/s/^#//' /etc/fuse.conf
  537. modprobe fuse
  538. fi
  539. echo "Enter your new samba account password:"
  540. pdbedit -a -u ${username}
  541. while [[ $? -ne 0 ]]; do
  542. pdbedit -a -u ${username}
  543. done
  544. # enable services
  545. system_ctl enable smb.service
  546. system_ctl enable nmb.service
  547. pause_function
  548. fi
  549. }
  550. #}}}
  551. #READAHEAD {{{
  552. enable_readahead(){
  553. print_title "Readahead - https://wiki.archlinux.org/index.php/Improve_Boot_Performance"
  554. 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)."
  555. read_input_text "Enable Readahead" $READAHEAD
  556. if [[ $OPTION == y ]]; then
  557. system_ctl enable systemd-readahead-collect
  558. system_ctl enable systemd-readahead-replay
  559. pause_function
  560. fi
  561. }
  562. #}}}
  563. #ZRAM {{{
  564. install_zram (){
  565. print_title "ZRAM - https://wiki.archlinux.org/index.php/Maximizing_Performance"
  566. 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)."
  567. read_input_text "Install Zram" $ZRAM
  568. if [[ $OPTION == y ]]; then
  569. aur_package_install "zramswap"
  570. system_ctl enable zramswap
  571. pause_function
  572. fi
  573. }
  574. #}}}
  575. #TLP {{{
  576. install_tlp(){
  577. print_title "TLP - https://wiki.archlinux.org/index.php/Tlp"
  578. 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."
  579. read_input_text "Install TLP" $TLP
  580. if [[ $OPTION == y ]]; then
  581. package_install "tlp"
  582. system_ctl enable tlp.service
  583. system_ctl enable tlp-sleep.service
  584. system_ctl mask systemd-rfkill.service
  585. system_ctl mask systemd-rfkill.socket
  586. tlp start
  587. pause_function
  588. fi
  589. }
  590. #}}}
  591. #XORG {{{
  592. install_xorg(){
  593. print_title "XORG - https://wiki.archlinux.org/index.php/Xorg"
  594. print_info "Xorg is the public, open-source implementation of the X window system version 11."
  595. echo "Installing X-Server (req. for Desktopenvironment, GPU Drivers, Keyboardlayout,...)"
  596. package_install "xorg-server xorg-apps xorg-xinit xorg-xkill xorg-xinput xf86-input-libinput"
  597. package_install "mesa"
  598. modprobe uinput
  599. pause_function
  600. }
  601. #}}}
  602. #WAYLAND {{{
  603. install_wayland(){
  604. print_title "WAYLAND - https://wiki.archlinux.org/index.php/Wayland"
  605. print_info "Wayland is a protocol for a compositing window manager to talk to its clients, as well as a library implementing the protocol. "
  606. package_install "weston xorg-server-xwayland"
  607. pause_function
  608. }
  609. #}}}
  610. #FONT CONFIGURATION {{{
  611. font_config(){
  612. print_title "FONTS CONFIGURATION - https://wiki.archlinux.org/index.php/Font_Configuration"
  613. 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."
  614. pacman -S --asdeps --needed cairo fontconfig freetype2
  615. pause_function
  616. }
  617. #}}}
  618. #VIDEO CARDS {{{
  619. create_ramdisk_environment(){
  620. if [ "$(ls /boot | grep hardened -c)" -gt "0" ]; then
  621. mkinitcpio -p linux-hardened
  622. elif [ "$(ls /boot | grep lts -c)" -gt "0" ]; then
  623. mkinitcpio -p linux-lts
  624. else
  625. mkinitcpio -p linux
  626. fi
  627. }
  628. install_video_cards(){
  629. package_install "dmidecode"
  630. print_title "VIDEO CARD"
  631. check_vga
  632. #Virtualbox {{{
  633. if [[ ${VIDEO_DRIVER} == virtualbox ]]; then
  634. if [ "$(ls /boot | grep hardened -c)" -gt "0" ] || [ "$(ls /boot | grep lts -c)" -gt "0" ]; then
  635. package_install "virtualbox-guest-dkms virtualbox-guest-utils mesa-libgl"
  636. else
  637. package_install "virtualbox-guest-modules-arch virtualbox-guest-utils mesa-libgl"
  638. fi
  639. add_module "vboxguest vboxsf vboxvideo" "virtualbox-guest"
  640. add_user_to_group ${username} vboxsf
  641. system_ctl enable vboxservice
  642. create_ramdisk_environment
  643. #}}}
  644. #VMware {{{
  645. elif [[ ${VIDEO_DRIVER} == vmware ]]; then
  646. package_install "xf86-video-vmware xf86-input-vmmouse"
  647. if [ "$(ls /boot | grep hardened -c)" -gt "0" ] || [ "$(ls /boot | grep lts -c)" -gt "0" ]; then
  648. aur_package_install "open-vm-tools-dkms"
  649. else
  650. package_install "open-vm-tools"
  651. fi
  652. cat /proc/version > /etc/arch-release
  653. system_ctl enable vmtoolsd
  654. create_ramdisk_environment
  655. #}}}
  656. #Bumblebee {{{
  657. elif [[ ${VIDEO_DRIVER} == bumblebee ]]; then
  658. XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
  659. [[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
  660. pacman -S --needed xf86-video-intel bumblebee nvidia
  661. [[ ${ARCHI} == x86_64 ]] && pacman -S --needed lib32-virtualgl lib32-nvidia-utils
  662. replace_line '*options nouveau modeset=1' '#options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
  663. replace_line '*MODULES="nouveau"' '#MODULES="nouveau"' /etc/mkinitcpio.conf
  664. create_ramdisk_environment
  665. add_user_to_group ${username} bumblebee
  666. #}}}
  667. #NVIDIA {{{
  668. elif [[ ${VIDEO_DRIVER} == nvidia ]]; then
  669. XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
  670. [[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
  671. if [ "$(ls /boot | grep hardened -c)" -gt "0" ] || [ "$(ls /boot | grep lts -c)" -gt "0" ]; then
  672. package_install "nvidia-dkms nvidia-utils libglvnd"
  673. echo "Do not forget to make a mkinitcpio every time you updated the nvidia driver!"
  674. else
  675. package_install "nvidia nvidia-utils libglvnd"
  676. fi
  677. [[ ${ARCHI} == x86_64 ]] && pacman -S --needed lib32-nvidia-utils
  678. replace_line '*options nouveau modeset=1' '#options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
  679. replace_line '*MODULES="nouveau"' '#MODULES="nouveau"' /etc/mkinitcpio.conf
  680. create_ramdisk_environment
  681. nvidia-xconfig --add-argb-glx-visuals --allow-glx-with-composite --composite --render-accel -o /etc/X11/xorg.conf.d/20-nvidia.conf;
  682. #}}}
  683. #Nouveau [NVIDIA] {{{
  684. elif [[ ${VIDEO_DRIVER} == nouveau ]]; then
  685. is_package_installed "nvidia" && pacman -Rdds --noconfirm nvidia{,-utils}
  686. [[ ${ARCHI} == x86_64 ]] && is_package_installed "lib32-nvidia-utils" && pacman -Rdds --noconfirm lib32-nvidia-utils
  687. [[ -f /etc/X11/xorg.conf.d/20-nvidia.conf ]] && rm /etc/X11/xorg.conf.d/20-nvidia.conf
  688. package_install "xf86-video-${VIDEO_DRIVER} mesa-libgl libvdpau-va-gl"
  689. replace_line '#*options nouveau modeset=1' 'options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
  690. replace_line '#*MODULES="nouveau"' 'MODULES="nouveau"' /etc/mkinitcpio.conf
  691. create_ramdisk_environment
  692. #}}}
  693. #ATI {{{
  694. elif [[ ${VIDEO_DRIVER} == ati ]]; then
  695. [[ -f /etc/X11/xorg.conf.d/20-radeon.conf ]] && rm /etc/X11/xorg.conf.d/20-radeon.conf
  696. [[ -f /etc/X11/xorg.conf ]] && rm /etc/X11/xorg.conf
  697. package_install "xf86-video-${VIDEO_DRIVER} mesa-libgl mesa-vdpau libvdpau-va-gl"
  698. add_module "radeon" "ati"
  699. create_ramdisk_environment
  700. #}}}
  701. #AMDGPU {{{
  702. elif [[ ${VIDEO_DRIVER} == amdgpu ]]; then
  703. [[ -f /etc/X11/xorg.conf.d/20-radeon.conf ]] && rm /etc/X11/xorg.conf.d/20-radeon.conf
  704. [[ -f /etc/X11/xorg.conf ]] && rm /etc/X11/xorg.conf
  705. package_install "xf86-video-${VIDEO_DRIVER} vulkan-radeon mesa-libgl mesa-vdpau libvdpau-va-gl"
  706. add_module "amdgpu radeon" "ati"
  707. create_ramdisk_environment
  708. #}}}
  709. #Intel {{{
  710. elif [[ ${VIDEO_DRIVER} == intel ]]; then
  711. package_install "xf86-video-${VIDEO_DRIVER} mesa-libgl libvdpau-va-gl"
  712. #}}}
  713. #Vesa {{{
  714. else
  715. package_install "xf86-video-${VIDEO_DRIVER} mesa-libgl libvdpau-va-gl"
  716. fi
  717. #}}}
  718. if [[ ${ARCHI} == x86_64 ]]; then
  719. is_package_installed "mesa-libgl" && package_install "lib32-mesa-libgl"
  720. is_package_installed "mesa-vdpau" && package_install "lib32-mesa-vdpau"
  721. fi
  722. if is_package_installed "libvdpau-va-gl"; then
  723. add_line "export VDPAU_DRIVER=va_gl" "/etc/profile"
  724. fi
  725. pause_function
  726. }
  727. #}}}
  728. #CUPS {{{
  729. install_cups(){
  730. print_title "CUPS - https://wiki.archlinux.org/index.php/Cups"
  731. 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."
  732. read_input_text "Install CUPS (aka Common Unix Printing System)" $CUPS
  733. if [[ $OPTION == y ]]; then
  734. package_install "cups cups-pdf"
  735. package_install "gutenprint ghostscript gsfonts foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-db-ppds foomatic-db-nonfree-ppds foomatic-db-gutenprint-ppds"
  736. system_ctl enable org.cups.cupsd.service
  737. pause_function
  738. fi
  739. }
  740. #}}}
  741. #ADDITIONAL FIRMWARE {{{
  742. install_additional_firmwares(){
  743. print_title "INSTALL ADDITIONAL FIRMWARES"
  744. read_input_text "Install additional firmwares [Audio,Bluetooth,Scanner,Wireless]" $FIRMWARE
  745. if [[ $OPTION == y ]]; then
  746. while true
  747. do
  748. print_title "INSTALL ADDITIONAL FIRMWARES"
  749. echo " 1) $(menu_item "aic94xx-firmware") $AUR"
  750. echo " 2) $(menu_item "alsa-firmware")"
  751. echo " 3) $(menu_item "b43-firmware") $AUR"
  752. echo " 4) $(menu_item "b43-firmware-legacy") $AUR"
  753. echo " 5) $(menu_item "bfa-firmware") $AUR"
  754. echo " 6) $(menu_item "bluez-firmware") [Broadcom BCM203x/STLC2300 Bluetooth]"
  755. echo " 7) $(menu_item "broadcom-wl-dkms")"
  756. echo " 8) $(menu_item "ipw2100-fw")"
  757. echo " 9) $(menu_item "ipw2200-fw")"
  758. echo "10) $(menu_item "libffado") [Fireware Audio Devices]"
  759. echo "11) $(menu_item "libmtp") [Android Devices]"
  760. echo "12) $(menu_item "libraw1394") [IEEE1394 Driver]"
  761. echo "13) $(menu_item "wd719x-firmware") $AUR"
  762. echo ""
  763. echo " d) DONE"
  764. echo ""
  765. FIRMWARE_OPTIONS+=" d"
  766. read_input_options "$FIRMWARE_OPTIONS"
  767. for OPT in ${OPTIONS[@]}; do
  768. case "$OPT" in
  769. 1)
  770. aur_package_install "aic94xx-firmware"
  771. ;;
  772. 2)
  773. package_install "alsa-firmware"
  774. ;;
  775. 3)
  776. aur_package_install "b43-firmware"
  777. ;;
  778. 4)
  779. aur_package_install "b43-firmware-legacy"
  780. ;;
  781. 5)
  782. aur_package_install "bfa-firmware"
  783. ;;
  784. 6)
  785. package_install "bluez-firmware"
  786. ;;
  787. 7)
  788. package_install "broadcom-wl-dkms"
  789. ;;
  790. 8)
  791. package_install "ipw2100-fw"
  792. ;;
  793. 9)
  794. package_install "ipw2200-fw"
  795. ;;
  796. 10)
  797. package_install "libffado"
  798. ;;
  799. 11)
  800. package_install "libmtp"
  801. package_install "android-udev"
  802. ;;
  803. 12)
  804. package_install "libraw1394"
  805. ;;
  806. 13)
  807. aur_package_install "wd719x-firmware"
  808. ;;
  809. "d")
  810. break
  811. ;;
  812. *)
  813. invalid_option
  814. ;;
  815. esac
  816. done
  817. source sharedfuncs_elihw
  818. create_ramdisk_environment
  819. done
  820. fi
  821. }
  822. #}}}
  823. #DESKTOP ENVIRONMENT {{{
  824. install_desktop_environment(){
  825. install_icon_theme() { #{{{
  826. while true
  827. do
  828. print_title "GNOME ICONS"
  829. echo " 1) $(menu_item "numix-icon-theme-git") $AUR"
  830. echo " 2) $(menu_item "papirus-icon-theme-git")"
  831. echo ""
  832. echo " b) BACK"
  833. echo ""
  834. ICONS_THEMES+=" b"
  835. read_input_options "$ICONS_THEMES"
  836. for OPT in ${OPTIONS[@]}; do
  837. case "$OPT" in
  838. 1)
  839. aur_package_install "numix-icon-theme-git numix-circle-icon-theme-git"
  840. ;;
  841. 2)
  842. aur_package_install "papirus-icon-theme-git"
  843. ;;
  844. "b")
  845. break
  846. ;;
  847. *)
  848. invalid_option
  849. ;;
  850. esac
  851. done
  852. source sharedfuncs_elihw
  853. done
  854. } #}}}
  855. install_gtk_theme() { #{{{
  856. while true
  857. do
  858. print_title "GTK2/GTK3 THEMES"
  859. echo " 1) $(menu_item "arc-gtk-theme" "Arc Themes")"
  860. echo ""
  861. echo " b) BACK"
  862. echo ""
  863. GTK_THEMES+=" b"
  864. read_input_options "$GTK_THEMES"
  865. for OPT in ${OPTIONS[@]}; do
  866. case "$OPT" in
  867. 1)
  868. package_install "arc-gtk-theme"
  869. ;;
  870. "b")
  871. break
  872. ;;
  873. *)
  874. invalid_option
  875. ;;
  876. esac
  877. done
  878. source sharedfuncs_elihw
  879. done
  880. } #}}}
  881. install_display_manager() { #{{{
  882. while true
  883. do
  884. print_title "DISPLAY MANAGER - https://wiki.archlinux.org/index.php/Display_Manager"
  885. 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."
  886. echo " 1) $(menu_item "entrance-git" "Entrance") $AUR"
  887. echo " 2) $(menu_item "gdm" "GDM")"
  888. echo " 3) $(menu_item "lightdm" "LightDM")"
  889. echo " 4) $(menu_item "sddm" "SDDM")"
  890. echo " 5) $(menu_item "slim" "Slim")"
  891. echo ""
  892. echo " b) BACK|SKIP"
  893. echo ""
  894. DISPLAY_MANAGER+=" b"
  895. read_input_options "$DISPLAY_MANAGER"
  896. for OPT in ${OPTIONS[@]}; do
  897. case "$OPT" in
  898. 1)
  899. aur_package_install "entrance-git"
  900. system_ctl enable entrance
  901. ;;
  902. 2)
  903. package_install "gdm"
  904. system_ctl enable gdm
  905. ;;
  906. 3)
  907. if [[ ${KDE} -eq 1 ]]; then
  908. package_install "lightdm lightdm-kde-greeter"
  909. else
  910. package_install "lightdm lightdm-gtk-greeter"
  911. fi
  912. system_ctl enable lightdm
  913. ;;
  914. 4)
  915. package_install "sddm sddm-kcm"
  916. system_ctl enable sddm
  917. sddm --example-config > /etc/sddm.conf
  918. sed -i 's/Current=/Current=breeze/' /etc/sddm.conf
  919. sed -i 's/CursorTheme=/CursorTheme=breeze_cursors/' /etc/sddm.conf
  920. sed -i 's/Numlock=none/Numlock=on/' /etc/sddm.conf
  921. ;;
  922. 5)
  923. package_install "slim"
  924. system_ctl enable slim
  925. ;;
  926. "b")
  927. break
  928. ;;
  929. *)
  930. invalid_option
  931. ;;
  932. esac
  933. done
  934. source sharedfuncs_elihw
  935. done
  936. } #}}}
  937. install_themes() { #{{{
  938. while true
  939. do
  940. print_title "$1 THEMES"
  941. echo " 1) $(menu_item "numix-circle-icon-theme-git" "Icons Themes") $AUR"
  942. echo " 2) $(menu_item "arc-gtk-theme" "GTK Themes")"
  943. echo ""
  944. echo " d) DONE"
  945. echo ""
  946. THEMES_OPTIONS+=" d"
  947. read_input_options "$THEMES_OPTIONS"
  948. for OPT in ${OPTIONS[@]}; do
  949. case "$OPT" in
  950. 1)
  951. install_icon_theme
  952. OPT=1
  953. ;;
  954. 2)
  955. install_gtk_theme
  956. OPT=2
  957. ;;
  958. "d")
  959. break
  960. ;;
  961. *)
  962. invalid_option
  963. ;;
  964. esac
  965. done
  966. source sharedfuncs_elihw
  967. done
  968. } #}}}
  969. install_misc_apps() { #{{{
  970. while true
  971. do
  972. print_title "$1 ESSENTIAL APPS"
  973. echo " 1) $(menu_item "entrance-git gdm lightdm sddm" "Display Manager") $AUR"
  974. echo " 2) $(menu_item "dmenu")"
  975. echo " 3) $(menu_item "viewnior")"
  976. echo " 4) $(menu_item "gmrun")"
  977. echo " 5) $(menu_item "rxvt-unicode")"
  978. echo " 6) $(menu_item "squeeze-git") $AUR"
  979. echo " 7) $(menu_item "thunar")"
  980. echo " 8) $(menu_item "tint2")"
  981. echo " 9) $(menu_item "volwheel")"
  982. echo "10) $(menu_item "xfburn")"
  983. echo "11) $(menu_item "xcompmgr")"
  984. echo "12) $(menu_item "zathura")"
  985. echo "13) $(menu_item "speedtest-cli")"
  986. echo ""
  987. echo " d) DONE"
  988. echo ""
  989. MISCAPPS+=" d"
  990. read_input_options "$MISCAPPS"
  991. for OPT in ${OPTIONS[@]}; do
  992. case "$OPT" in
  993. 1)
  994. install_display_manager
  995. OPT=1
  996. ;;
  997. 2)
  998. package_install "dmenu"
  999. ;;
  1000. 3)
  1001. package_install "viewnior"
  1002. ;;
  1003. 4)
  1004. package_install "gmrun"
  1005. ;;
  1006. 5)
  1007. package_install "rxvt-unicode"
  1008. ;;
  1009. 6)
  1010. aur_package_install "squeeze-git"
  1011. ;;
  1012. 7)
  1013. package_install "thunar tumbler"
  1014. ;;
  1015. 8)
  1016. package_install "tint2"
  1017. ;;
  1018. 9)
  1019. package_install "volwheel"
  1020. ;;
  1021. 10)
  1022. package_install "xfburn"
  1023. ;;
  1024. 11)
  1025. package_install "xcompmgr transset-df"
  1026. ;;
  1027. 12)
  1028. package_install "zathura"
  1029. ;;
  1030. 13)
  1031. package_install "speedtest-cli"
  1032. ;;
  1033. "d")
  1034. break
  1035. ;;
  1036. *)
  1037. invalid_option
  1038. ;;
  1039. esac
  1040. done
  1041. source sharedfuncs_elihw
  1042. done
  1043. } #}}}
  1044.  
  1045. print_title "DESKTOP ENVIRONMENT|WINDOW MANAGER"
  1046. 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."
  1047.  
  1048. echo -e "Select your DE or WM:\n"
  1049. echo " --- DE --- --- WM ---"
  1050. echo " 1) Cinnamon 10) Awesome"
  1051. echo " 2) Deepin 11) Fluxbox"
  1052. echo " 3) Enlightenment 12) i3"
  1053. echo " 4) GNOME 13) OpenBox"
  1054. echo " 5) KDE 14) Xmonad"
  1055. echo " 6) LXQT"
  1056. echo " 7) Mate"
  1057. echo " 8) XFCE"
  1058. echo " 9) Budgie"
  1059. echo ""
  1060. echo " b) BACK"
  1061. read_input $DESKTOPENV
  1062. case "$OPTION" in
  1063. 1)
  1064. #CINNAMON {{{
  1065. print_title "CINNAMON - https://wiki.archlinux.org/index.php/Cinnamon"
  1066. 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."
  1067. package_install "cinnamon nemo-fileroller nemo-preview"
  1068. # Cinnamon does not include the following: a screenshot utility, editor, terminal... Hence installing some default choices explicitly.
  1069. package_install "gnome-screenshot gedit gnome-terminal gnome-control-center gnome-system-monitor gnome-schedule gnome-power-manager"
  1070. # Suggested by https://bbs.archlinux.org/viewtopic.php?id=185123
  1071. aur_package_install "mintlocale"
  1072. # config xinitrc
  1073. config_xinitrc "cinnamon-session"
  1074. CINNAMON=1
  1075. pause_function
  1076. install_display_manager
  1077. install_themes "CINNAMON"
  1078. ;;
  1079. #}}}
  1080. 2)
  1081. #DEEPIN {{{
  1082. print_title "DEEPIN - https://wiki.archlinux.org/index.php/Deepin_Desktop_Environment"
  1083. print_info "The desktop interface and apps feature an intuitive and elegant design. Moving around, sharing and searching etc. has become simply a joyful experience."
  1084. package_install "deepin deepin-extra lightdm-gtk-greeter"
  1085. # config xinitrc
  1086. config_xinitrc "startdde"
  1087. #Tweaks
  1088. pause_function
  1089. system_ctl enable lightdm
  1090. sed -i 's/#greeter-session=example-gtk-gnome/greeter-session=lightdm-deepin-greeter/' /etc/lightdm/lightdm.conf
  1091. ;;
  1092. #}}}
  1093. 3)
  1094. #ENLIGHTENMENT {{{
  1095. print_title "ENLIGHTENMENT - http://wiki.archlinux.org/index.php/Enlightenment"
  1096. 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."
  1097. package_install "enlightenment terminology"
  1098. package_install "leafpad epdfview"
  1099. package_install "lxappearance"
  1100. # config xinitrc
  1101. config_xinitrc "enlightenment_start"
  1102. pause_function
  1103. install_misc_apps "Enlightenment"
  1104. install_themes "Enlightenment"
  1105. ;;
  1106. #}}}
  1107. 4)
  1108. #GNOME {{{
  1109. print_title "GNOME - https://wiki.archlinux.org/index.php/GNOME"
  1110. 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."
  1111. package_install "gnome gnome-extra gnome-software gnome-initial-setup"
  1112. package_install "deja-dup gedit-plugins gpaste gnome-tweak-tool gnome-power-manager"
  1113. package_install "nautilus-share"
  1114. # remove gnome games
  1115. package_remove "aisleriot atomix four-in-a-row five-or-more gnome-2048 gnome-chess gnome-klotski gnome-mahjongg gnome-mines gnome-nibbles gnome-robots gnome-sudoku gnome-tetravex gnome-taquin swell-foop hitori iagno quadrapassel lightsoff tali"
  1116. # config xinitrc
  1117. config_xinitrc "gnome-session"
  1118. GNOME=1
  1119. pause_function
  1120. install_themes "GNOME"
  1121. #Gnome Display Manager (a reimplementation of xdm)
  1122. system_ctl enable gdm
  1123. ;;
  1124. #}}}
  1125. 5)
  1126. #KDE {{{
  1127. print_title "KDE - https://wiki.archlinux.org/index.php/KDE"
  1128. 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."
  1129. package_install "plasma kf5 sddm"
  1130. package_install "ark dolphin dolphin-plugins kio-extras kdeconnect quota-tools gwenview kipi-plugins kate kcalc konsole spectacle okular sweeper kwalletmanager"
  1131. is_package_installed "cups" && package_install "print-manager"
  1132. [[ $LOCALE != en_US ]] && package_install "kde-l10n-$LOCALE_KDE"
  1133. # config xinitrc
  1134. config_xinitrc "startkde"
  1135. pause_function
  1136. #KDE CUSTOMIZATION {{{
  1137. while true
  1138. do
  1139. print_title "KDE CUSTOMIZATION"
  1140. echo " 1) $(menu_item "choqok")"
  1141. echo " 2) $(menu_item "digikam")"
  1142. echo " 3) $(menu_item "k3b")"
  1143. echo " 4) $(menu_item "skrooge")"
  1144. echo " 5) $(menu_item "yakuake")"
  1145. echo ""
  1146. echo " d) DONE"
  1147. echo ""
  1148. KDE_OPTIONS+=" d"
  1149. read_input_options "$KDE_OPTIONS"
  1150. for OPT in ${OPTIONS[@]}; do
  1151. case "$OPT" in
  1152. 1)
  1153. package_install "choqok"
  1154. ;;
  1155. 2)
  1156. package_install "digikam"
  1157. ;;
  1158. 3)
  1159. package_install "k3b cdrdao dvd+rw-tools"
  1160. ;;
  1161. 4)
  1162. package_install "skrooge"
  1163. ;;
  1164. 5)
  1165. package_install "yakuake"
  1166. ;;
  1167. "d")
  1168. break
  1169. ;;
  1170. *)
  1171. invalid_option
  1172. ;;
  1173. esac
  1174. done
  1175. source sharedfuncs_elihw
  1176. done
  1177. #}}}
  1178. system_ctl enable sddm
  1179. sddm --example-config > /etc/sddm.conf
  1180. sed -i 's/Current=/Current=breeze/' /etc/sddm.conf
  1181. sed -i 's/CursorTheme=/CursorTheme=breeze_cursors/' /etc/sddm.conf
  1182. sed -i 's/Numlock=none/Numlock=on/' /etc/sddm.conf
  1183. KDE=1
  1184. ;;
  1185. #}}}
  1186. 6)
  1187. #LXQT {{{
  1188. print_title "LXQT - http://wiki.archlinux.org/index.php/lxqt"
  1189. print_info "LXQt is the Qt port and the upcoming version of LXDE, the Lightweight Desktop Environment. It is the product of the merge between the LXDE-Qt and the Razor-qt projects: A lightweight, modular, blazing-fast and user-friendly desktop environment."
  1190. package_install "lxqt openbox breeze-icons"
  1191. package_install "leafpad epdfview"
  1192. mkdir -p /home/${username}/.config/lxqt
  1193. cp /etc/xdg/lxqt/* /home/${username}/.config/lxqt
  1194. mkdir -p /home/${username}/.config/openbox/
  1195. cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${username}/.config/openbox/
  1196. chown -R ${username}:users /home/${username}/.config
  1197. # config xinitrc
  1198. config_xinitrc "startlxqt"
  1199. pause_function
  1200. install_misc_apps "LXQT"
  1201. install_themes "LXQT"
  1202. KDE=1
  1203. ;;
  1204. #}}}
  1205. 7)
  1206. #MATE {{{
  1207. print_title "MATE - https://wiki.archlinux.org/index.php/Mate"
  1208. 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."
  1209. package_install "mate mate-extra"
  1210. # config xinitrc
  1211. config_xinitrc "mate-session"
  1212. pause_function
  1213. install_display_manager
  1214. install_themes "MATE"
  1215. ;;
  1216. #}}}
  1217. 8)
  1218. #XFCE {{{
  1219. print_title "XFCE - https://wiki.archlinux.org/index.php/Xfce"
  1220. 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."
  1221. package_install "xfce4 xfce4-goodies xarchiver mupdf"
  1222. # config xinitrc
  1223. config_xinitrc "startxfce4"
  1224. pause_function
  1225. install_display_manager
  1226. install_themes "XFCE"
  1227. ;;
  1228. #}}}
  1229. 9)
  1230. #BUDGIE {{{
  1231. print_title "BUDGIE - https://wiki.archlinux.org/index.php/Budgie_Desktop"
  1232. print_info "Budgie is the default desktop of Solus Operating System, written from scratch. Besides a more modern design, Budgie can emulate the look and feel of the GNOME 2 desktop."
  1233. package_install "gnome gnome-extra gnome-software gnome-initial-setup telepathy"
  1234. package_install "deja-dup gedit-plugins gpaste gnome-tweak-tool gnome-power-manager"
  1235. package_install "budgie-desktop"
  1236. package_install "nautilus-share"
  1237. # remove gnome games
  1238. package_remove "aisleriot atomix four-in-a-row five-or-more gnome-2048 gnome-chess gnome-klotski gnome-mahjongg gnome-mines gnome-nibbles gnome-robots gnome-sudoku gnome-tetravex gnome-taquin swell-foop hitori iagno quadrapassel lightsoff"
  1239. # config xinitrc
  1240. config_xinitrc "export XDG_CURRENT_DESKTOP=Budgie:GNOME \n budgie-desktop"
  1241. GNOME=1
  1242. pause_function
  1243. install_themes "GNOME"
  1244. #Gnome Display Manager (a reimplementation of xdm)
  1245. system_ctl enable gdm
  1246. ;;
  1247. #}}}
  1248. 10)
  1249. #AWESOME {{{
  1250. print_title "AWESOME - http://wiki.archlinux.org/index.php/Awesome"
  1251. 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."
  1252. package_install "awesome"
  1253. package_install "lxappearance"
  1254. package_install "leafpad epdfview nitrogen"
  1255. if [[ ! -d /home/${username}/.config/awesome/ ]]; then
  1256. mkdir -p /home/${username}/.config/awesome/
  1257. cp /etc/xdg/awesome/rc.lua /home/${username}/.config/awesome/
  1258. chown -R ${username}:users /home/${username}/.config
  1259. fi
  1260. # config xinitrc
  1261. config_xinitrc "awesome"
  1262. pause_function
  1263. install_misc_apps "AWESOME"
  1264. install_themes "AWESOME"
  1265. ;;
  1266. #}}}
  1267. 11)
  1268. #FLUXBOX {{{
  1269. print_title "FLUXBOX - http://wiki.archlinux.org/index.php/Fluxbox"
  1270. 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."
  1271. package_install "fluxbox menumaker"
  1272. package_install "lxappearance"
  1273. package_install "leafpad epdfview"
  1274. # config xinitrc
  1275. config_xinitrc "startfluxbox"
  1276. install_misc_apps "FLUXBOX"
  1277. install_themes "FLUXBOX"
  1278. pause_function
  1279. ;;
  1280. #}}}
  1281. 12)
  1282. #I3 {{{
  1283. print_title "i3 - https://wiki.archlinux.org/index.php/I3"
  1284. print_info "i3 is a dynamic tiling window manager inspired by wmii that is primarily targeted at developers and advanced users. The stated goals for i3 include clear documentation, proper multi-monitor support, a tree structure for windows, and different modes like in vim."
  1285. package_install "i3"
  1286. package_install "dmenu"
  1287. # config xinitrc
  1288. config_xinitrc "i3"
  1289. pause_function
  1290. install_misc_apps "i3"
  1291. install_themes "i3"
  1292. ;;
  1293. #}}}
  1294. 13)
  1295. #OPENBOX {{{
  1296. print_title "OPENBOX - http://wiki.archlinux.org/index.php/Openbox"
  1297. print_info "Openbox is a lightweight and highly configurable window manager with extensive standards support."
  1298. package_install "openbox obconf obmenu menumaker"
  1299. package_install "lxappearance"
  1300. package_install "leafpad epdfview nitrogen"
  1301. mkdir -p /home/${username}/.config/openbox/
  1302. cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${username}/.config/openbox/
  1303. chown -R ${username}:users /home/${username}/.config
  1304. # config xinitrc
  1305. config_xinitrc "openbox-session"
  1306. pause_function
  1307. install_misc_apps "OPENBOX"
  1308. install_themes "OPENBOX"
  1309. ;;
  1310. #}}}
  1311. 14)
  1312. #XMONAD {{{
  1313. print_title "XMONAD - http://wiki.archlinux.org/index.php/Xmonad"
  1314. print_info "xmonad is a tiling window manager for X. Windows are arranged automatically to tile the screen without gaps or overlap, maximizing screen use. Window manager features are accessible from the keyboard: a mouse is optional."
  1315. package_install "xmonad xmonad-contrib"
  1316. # config xinitrc
  1317. config_xinitrc "xmonad"
  1318. pause_function
  1319. install_misc_apps "XMONAD"
  1320. install_themes "XMONAD"
  1321. ;;
  1322. #}}}
  1323. "b")
  1324. break
  1325. ;;
  1326. *)
  1327. invalid_option
  1328. install_desktop_environment
  1329. ;;
  1330. esac
  1331. #COMMON PKGS {{{
  1332. #MTP SUPPORT {{{
  1333. if is_package_installed "libmtp" ; then
  1334. package_install "gvfs-mtp"
  1335. fi
  1336. #}}}
  1337. if [[ ${KDE} -eq 0 ]]; then
  1338. package_install "gvfs gvfs-goa gvfs-afc gvfs-mtp gvfs-google"
  1339. package_install "xdg-user-dirs-gtk"
  1340. package_install "pavucontrol"
  1341. package_install "ttf-bitstream-vera ttf-dejavu"
  1342. aur_package_install "gnome-defaults-list"
  1343. is_package_installed "cups" && package_install "system-config-printer gtk3-print-backends"
  1344. is_package_installed "samba" && package_install "gvfs-smb"
  1345. fi
  1346. #}}}
  1347. #COMMON CONFIG {{{
  1348. # speed up application startup
  1349. mkdir -p ~/.compose-cache
  1350. # D-Bus interface for user account query and manipulation
  1351. system_ctl enable accounts-daemon
  1352. # Improvements
  1353. add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
  1354. #}}}
  1355. }
  1356. #}}}
  1357. #CONNMAN/NETWORKMANAGER/WICD {{{
  1358. install_nm_wicd(){
  1359. print_title "NETWORK MANAGER"
  1360. echo " 1) Networkmanager"
  1361. echo " 2) Wicd"
  1362. echo " 3) ConnMan"
  1363. echo ""
  1364. echo " n) NONE"
  1365. echo ""
  1366. read_input $NETWORKMANAGER
  1367. case "$OPTION" in
  1368. 1)
  1369. print_title "NETWORKMANAGER - https://wiki.archlinux.org/index.php/Networkmanager"
  1370. 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."
  1371. package_install "networkmanager dnsmasq networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc"
  1372. if [[ ${KDE} -eq 1 ]]; then
  1373. package_install "plasma-nm"
  1374. elif [[ ${GNOME} -eq 0 ]]; then
  1375. package_install "network-manager-applet nm-connection-editor gnome-keyring"
  1376. fi
  1377. # network management daemon
  1378. system_ctl enable NetworkManager.service
  1379. pause_function
  1380. ;;
  1381. 2)
  1382. print_title "WICD - https://wiki.archlinux.org/index.php/Wicd"
  1383. print_info "Wicd is a network connection manager that can manage wireless and wired interfaces, similar and an alternative to NetworkManager."
  1384. if [[ ${KDE} -eq 1 ]]; then
  1385. echo "KDE unsupported. Installing CLI and curses versions only."
  1386. package_install "wicd"
  1387. else
  1388. package_install "wicd wicd-gtk"
  1389. fi
  1390. # WICD daemon
  1391. system_ctl enable wicd.service
  1392. pause_function
  1393. ;;
  1394. 3)
  1395. print_title "CONNMAN - https://wiki.archlinux.org/index.php/Connman"
  1396. print_info "ConnMan is an alternative to NetworkManager and Wicd and was created by Intel and the Moblin project for use with embedded devices."
  1397. package_install "connman"
  1398. # ConnMan daemon
  1399. system_ctl enable connman.service
  1400. pause_function
  1401. ;;
  1402. esac
  1403. }
  1404. #}}}
  1405. #USB 3G MODEM {{{
  1406. install_usb_modem(){
  1407. print_title "USB 3G MODEM - https://wiki.archlinux.org/index.php/USB_3G_Modem"
  1408. 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."
  1409. read_input_text "Install usb 3G modem support" $USBMODEM
  1410. if [[ $OPTION == y ]]; then
  1411. package_install "usbutils usb_modeswitch"
  1412. if is_package_installed "networkmanager"; then
  1413. package_install "modemmanager"
  1414. [[ ${KDE} -eq 1 ]] && package_install "modemmanager-qt"
  1415. system_ctl enable ModemManager.service
  1416. else
  1417. package_install "wvdial"
  1418. fi
  1419. pause_function
  1420. fi
  1421. }
  1422. #}}}
  1423. #BLUETOOTH {{{
  1424. install_bluetooth(){
  1425. print_title "BLUETOOTH - https://wiki.archlinux.org/index.php/Bluetooth"
  1426. print_info "Bluetooth is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. In Linux, the canonical implementation of the Bluetooth protocol stack is BlueZ"
  1427. read_input_text "Install bluetooth support" $BLUETOOTH
  1428. if [[ $OPTION == y ]]; then
  1429. package_install "bluez bluez-utils"
  1430. system_ctl enable bluetooth.service
  1431. pause_function
  1432. fi
  1433. }
  1434. #}}}
  1435. #ACCESSORIES {{{
  1436. install_accessories_apps(){
  1437. while true
  1438. do
  1439. print_title "ACCESSORIES APPS"
  1440. echo " 1) $(menu_item "albert")"
  1441. echo " 2) $(menu_item "catfish")"
  1442. echo " 3) $(menu_item "conky-lua") $AUR"
  1443. echo " 4) $(menu_item "enpass-bin") $AUR"
  1444. echo " 5) $(menu_item "keepass")"
  1445. echo " 6) $(menu_item "pamac-aur" "Pamac") $AUR"
  1446. echo " 7) $(menu_item "shutter hotshots" "$([[ ${KDE} -eq 1 ]] && echo "Hotshots" || echo "Shutter";)")"
  1447. echo " 8) $(menu_item "synapse")"
  1448. echo " 9) $(menu_item "terminator")"
  1449. echo "10) $(menu_item "tilix-bin") $AUR"
  1450. echo ""
  1451. echo " b) BACK"
  1452. echo ""
  1453. ACCESSORIES_OPTIONS+=" b"
  1454. read_input_options "$ACCESSORIES_OPTIONS"
  1455. for OPT in ${OPTIONS[@]}; do
  1456. case "$OPT" in
  1457. 1)
  1458. package_install "albert"
  1459. ;;
  1460. 2)
  1461. package_install "catfish"
  1462. ;;
  1463. 3)
  1464. aur_package_install "conky-lua"
  1465. package_install "lm_sensors"
  1466. sensors-detect --auto
  1467. ;;
  1468. 4)
  1469. aur_package_install "enpass-bin"
  1470. ;;
  1471. 5)
  1472. package_install "keepass"
  1473. ;;
  1474. 6)
  1475. aur_package_install "pamac-aur"
  1476. ;;
  1477. 7)
  1478. if [[ ${KDE} -eq 1 ]]; then
  1479. aur_package_install "hotshots"
  1480. else
  1481. aur_package_install "shutter"
  1482. fi
  1483. ;;
  1484. 8)
  1485. package_install "synapse"
  1486. ;;
  1487. 9)
  1488. package_install "terminator"
  1489. ;;
  1490. 10)
  1491. aur_package_install "tilix-bin"
  1492. ;;
  1493. "b")
  1494. break
  1495. ;;
  1496. *)
  1497. invalid_option
  1498. ;;
  1499. esac
  1500. done
  1501. source sharedfuncs_elihw
  1502. done
  1503. }
  1504. #}}}
  1505. #DEVELOPEMENT {{{
  1506. install_development_apps(){
  1507. while true
  1508. do
  1509. print_title "DEVELOPMENT APPS"
  1510. echo " 1) $(menu_item "atom" "Atom")"
  1511. echo " 2) $(menu_item "emacs")"
  1512. echo " 3) $(menu_item "gvim")"
  1513. echo " 4) $(menu_item "meld")"
  1514. echo " 5) $(menu_item "sublime-text2" "Sublime Text 2") $AUR"
  1515. echo " 6) $(menu_item "sublime-text-dev" "Sublime Text 3") $AUR"
  1516. echo " 7) $(menu_item "android-studio" "Android Studio") $AUR"
  1517. echo " 8) $(menu_item "jetbrains-toolbox" "Jetbrains Toolbox") $AUR"
  1518. echo " 9) $(menu_item "intellij-idea-community-edition" "IntelliJ IDEA Community Edition")"
  1519. echo "10) $(menu_item "intellij-idea-ultimate-edition" "IntelliJ IDEA Ultimate Edition") $AUR"
  1520. echo "11) $(menu_item "monodevelop")"
  1521. echo "12) $(menu_item "qtcreator")"
  1522. echo "13) $(menu_item "mysql-workbench" "MySQL Workbench") $AUR"
  1523. echo "14) $(menu_item "jdk8-openjdk" "OpenJDK 8")"
  1524. echo "15) $(menu_item "jdk9-openjdk" "OpenJDK 9")"
  1525. echo "16) $(menu_item "jdk10-openjdk" "OpenJDK 10")"
  1526. echo "17) $(menu_item "jdk" "Oracle JDK") $AUR"
  1527. echo "18) $(menu_item "nodejs")"
  1528. echo "19) $(menu_item "visual-studio-code-bin" "Visual Studio Code") $AUR"
  1529. echo "20) $(menu_item "gitg")"
  1530. echo "21) $(menu_item "kdiff3")"
  1531. echo "22) $(menu_item "regexxer")"
  1532. echo "23) $(menu_item "postman-bin" "Postman") $AUR"
  1533. echo "24) $(menu_item "gitkraken" "Gitkraken") $AUR"
  1534. echo ""
  1535. echo " b) BACK"
  1536. echo ""
  1537. DEVELOPMENT_OPTIONS+=" b"
  1538. read_input_options "$DEVELOPMENT_OPTIONS"
  1539. for OPT in ${OPTIONS[@]}; do
  1540. case "$OPT" in
  1541. 1)
  1542. package_install "atom"
  1543. ;;
  1544. 2)
  1545. package_install "emacs"
  1546. ;;
  1547. 3)
  1548. package_remove "vim"
  1549. package_install "gvim ctags"
  1550. ;;
  1551. 4)
  1552. package_install "meld"
  1553. ;;
  1554. 5)
  1555. aur_package_install "sublime-text2"
  1556. ;;
  1557. 6)
  1558. aur_package_install "sublime-text-dev"
  1559. ;;
  1560. 7)
  1561. aur_package_install "android-sdk android-sdk-platform-tools android-sdk-build-tools android-platform"
  1562. add_user_to_group ${username} sdkusers
  1563. chown -R :sdkusers /opt/android-sdk/
  1564. chmod -R g+w /opt/android-sdk/
  1565. add_line "export ANDROID_HOME=/opt/android-sdk" "/home/${username}/.bashrc"
  1566. aur_package_install "android-studio"
  1567. ;;
  1568. 8)
  1569. aur_package_install "jetbrains-toolbox"
  1570. ;;
  1571. 9)
  1572. package_install "intellij-idea-community-edition"
  1573. ;;
  1574. 10)
  1575. aur_package_install "intellij-idea-ultimate-edition"
  1576. ;;
  1577. 11)
  1578. package_install "monodevelop monodevelop-debugger-gdb"
  1579. ;;
  1580. 12)
  1581. package_install "qtcreator"
  1582. ;;
  1583. 13)
  1584. aur_package_install "mysql-workbench"
  1585. ;;
  1586. 14)
  1587. package_remove "jdk"
  1588. package_install "jdk8-openjdk"
  1589. ;;
  1590. 15)
  1591. package_remove "jdk"
  1592. package_install "jdk9-openjdk"
  1593. ;;
  1594. 16)
  1595. package_remove "jdk"
  1596. package_install "jdk10-openjdk"
  1597. ;;
  1598. 17)
  1599. package_remove "jre{7,8,9,10}-openjdk"
  1600. package_remove "jdk{7,8,9,10}-openjdk"
  1601. aur_package_install "jdk"
  1602. ;;
  1603. 18)
  1604. package_install "nodejs"
  1605. ;;
  1606. 19)
  1607. aur_package_install "visual-studio-code-bin"
  1608. ;;
  1609. 20)
  1610. aur_package_install "gitg"
  1611. aur_package_install "qgit"
  1612. ;;
  1613. 21)
  1614. aur_package_install "kdiff3"
  1615. ;;
  1616. 22)
  1617. aur_package_install "regexxer"
  1618. ;;
  1619. 23)
  1620. aur_package_install "postman-bin"
  1621. ;;
  1622. 24)
  1623. aur_package_install "gitkraken"
  1624. ;;
  1625. "b")
  1626. break
  1627. ;;
  1628. *)
  1629. invalid_option
  1630. ;;
  1631. esac
  1632. done
  1633. source sharedfuncs_elihw
  1634. done
  1635. }
  1636. #}}}
  1637. #OFFICE {{{
  1638. install_office_apps(){
  1639. while true
  1640. do
  1641. print_title "OFFICE APPS"
  1642. echo " 1) $(menu_item "goffice calligra-libs" "$([[ ${KDE} -eq 1 ]] && echo "Caligra" || echo "Abiword + Gnumeric";)")"
  1643. echo " 2) $(menu_item "calibre")"
  1644. echo " 3) $(menu_item "goldendict")"
  1645. echo " 4) $(menu_item "homebank")"
  1646. echo " 5) $(menu_item "texlive-core" "latex")"
  1647. echo " 6) $(menu_item "libreoffice-fresh" "LibreOffice")"
  1648. echo " 7) $(menu_item "lyx")"
  1649. echo " 8) $(menu_item "ocrfeeder")"
  1650. echo " 9) $(menu_item "tellico")"
  1651. echo "10) $(menu_item "typora")"
  1652. echo "11) $(menu_item "xmind")"
  1653. echo ""
  1654. echo " b) BACK"
  1655. echo ""
  1656. OFFICE_OPTIONS+=" b"
  1657. read_input_options "$OFFICE_OPTIONS"
  1658. for OPT in ${OPTIONS[@]}; do
  1659. case "$OPT" in
  1660. 1)
  1661. if [[ ${KDE} -eq 1 ]]; then
  1662. package_install "calligra"
  1663. else
  1664. package_install "gnumeric abiword abiword-plugins"
  1665. fi
  1666. package_install "hunspell hunspell-$LOCALE_HS"
  1667. package_install "aspell aspell-$LOCALE_AS"
  1668. ;;
  1669. 2)
  1670. package_install "calibre"
  1671. ;;
  1672. 3)
  1673. package_install "goldendict"
  1674. ;;
  1675. 4)
  1676. package_install "homebank"
  1677. ;;
  1678. 5)
  1679. package_install "texlive-most"
  1680. if [[ $LOCALE == pt_BR ]]; then
  1681. aur_package_install "abntex"
  1682. fi
  1683. ;;
  1684. 6)
  1685. print_title "LIBREOFFICE - https://wiki.archlinux.org/index.php/LibreOffice"
  1686. package_install "libreoffice-fresh"
  1687. [[ $LOCALE != en_US ]] && package_install "libreoffice-fresh-$LOCALE_LO"
  1688. package_install "hunspell hunspell-$LOCALE_HS"
  1689. package_install "aspell aspell-$LOCALE_AS"
  1690. ;;
  1691. 7)
  1692. package_install "lyx"
  1693. ;;
  1694. 8)
  1695. package_install "ocrfeeder tesseract gocr"
  1696. package_install "aspell aspell-$LOCALE_AS"
  1697. ;;
  1698. 9)
  1699. package_install "tellico"
  1700. ;;
  1701. 10)
  1702. package_install "typora"
  1703. ;;
  1704. 11)
  1705. package_install "xmind"
  1706. ;;
  1707. "b")
  1708. break
  1709. ;;
  1710. *)
  1711. invalid_option
  1712. ;;
  1713. esac
  1714. done
  1715. source sharedfuncs_elihw
  1716. done
  1717. }
  1718. #}}}
  1719. #SYSTEM TOOLS {{{
  1720. install_system_apps(){
  1721. while true
  1722. do
  1723. print_title "SYSTEM TOOLS APPS"
  1724. echo " 1) $(menu_item "clamav" "Clamav Antivirus")"
  1725. echo " 2) $(menu_item "cockpit") $AUR"
  1726. echo " 3) $(menu_item "webmin") $AUR"
  1727. echo " 4) $(menu_item "docker")"
  1728. echo " 5) $(menu_item "firewalld")"
  1729. echo " 6) $(menu_item "gparted")"
  1730. echo " 7) $(menu_item "grsync")"
  1731. echo " 8) $(menu_item "hosts-update") $AUR"
  1732. echo " 9) $(menu_item "htop")"
  1733. echo "10) $(menu_item "ufw") $AUR"
  1734. echo "11) $(menu_item "unified-remote-server" "Unified Remote") $AUR"
  1735. echo "12) $(menu_item "virtualbox")"
  1736. echo "13) $(menu_item "wine")"
  1737. echo "14) $(menu_item "netdata")"
  1738. echo "15) $(menu_item "nload")"
  1739. echo "16) $(menu_item "vmware-workstation12" "VMware Workstation 12") $AUR"
  1740. echo ""
  1741. echo " b) BACK"
  1742. echo ""
  1743. SYSTEMTOOLS_OPTIONS+=" b"
  1744. read_input_options "$SYSTEMTOOLS_OPTIONS"
  1745. for OPT in ${OPTIONS[@]}; do
  1746. case "$OPT" in
  1747. 1)
  1748. package_install "clamav"
  1749. cp /etc/clamav/clamd.conf.sample /etc/clamav/clamd.conf
  1750. cp /etc/clamav/freshclam.conf.sample /etc/clamav/freshclam.conf
  1751. sed -i '/Example/d' /etc/clamav/freshclam.conf
  1752. sed -i '/Example/d' /etc/clamav/clamd.conf
  1753. system_ctl enable clamd
  1754. freshclam
  1755. ;;
  1756. 2)
  1757. aur_package_install "cockpit storaged linux-user-chroot ostree"
  1758. ;;
  1759. 3)
  1760. aur_package_install "webmin"
  1761. ;;
  1762. 4)
  1763. package_install "docker"
  1764. add_user_to_group ${username} docker
  1765. ;;
  1766. 5)
  1767. is_package_installed "ufw" && package_remove "ufw"
  1768. is_package_installed "firewalld" && package_remove "firewalld"
  1769. package_install "firewalld"
  1770. system_ctl enable firewalld
  1771. ;;
  1772. 6)
  1773. package_install "gparted"
  1774. ;;
  1775. 7)
  1776. package_install "grsync"
  1777. ;;
  1778. 8)
  1779. aur_package_install "hosts-update"
  1780. hosts-update
  1781. ;;
  1782. 9)
  1783. package_install "htop"
  1784. ;;
  1785. 10)
  1786. print_title "UFW - https://wiki.archlinux.org/index.php/Ufw"
  1787. 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."
  1788. is_package_installed "firewalld" && package_remove "firewalld"
  1789. aur_package_install "ufw gufw"
  1790. system_ctl enable ufw.service
  1791. ;;
  1792. 11)
  1793. aur_package_install "unified-remote-server"
  1794. system_ctl enable urserver.service
  1795. ;;
  1796. 12)
  1797. #Make sure we are not a VirtualBox Guest
  1798. VIRTUALBOX_GUEST=`dmidecode --type 1 | grep VirtualBox`
  1799. if [[ -z ${VIRTUALBOX_GUEST} ]]; then
  1800. package_install "virtualbox virtualbox-host-dkms virtualbox-guest-iso linux-headers"
  1801. aur_package_install "virtualbox-ext-oracle"
  1802. add_user_to_group ${username} vboxusers
  1803. modprobe vboxdrv vboxnetflt
  1804. else
  1805. cecho "${BBlue}[${Reset}${Bold}!${BBlue}]${Reset} VirtualBox was not installed as we are a VirtualBox guest."
  1806. fi
  1807. ;;
  1808. 13)
  1809. package_install "icoutils wine wine_gecko wine-mono winetricks"
  1810. ;;
  1811. 14)
  1812. package_install "netdata"
  1813. system_ctl enable netdata.service
  1814. ;;
  1815. 15)
  1816. package_install "nload"
  1817. ;;
  1818. 16)
  1819. aur_package_install "vmware-workstation12"
  1820. ;;
  1821. "b")
  1822. break
  1823. ;;
  1824. *)
  1825. invalid_option
  1826. ;;
  1827. esac
  1828. done
  1829. source sharedfuncs_elihw
  1830. done
  1831. }
  1832. #}}}
  1833. #GRAPHICS {{{
  1834. install_graphics_apps(){
  1835. while true
  1836. do
  1837. print_title "GRAPHICS APPS"
  1838. echo " 1) $(menu_item "blender")"
  1839. echo " 2) $(menu_item "gimp")"
  1840. echo " 3) $(menu_item "gthumb")"
  1841. echo " 4) $(menu_item "inkscape")"
  1842. echo " 5) $(menu_item "mcomix")"
  1843. echo " 6) $(menu_item "mypaint")"
  1844. echo " 7) $(menu_item "pencil" "Pencil Prototyping Tool") $AUR"
  1845. echo " 8) $(menu_item "scribus")"
  1846. echo " 9) $(menu_item "shotwell")"
  1847. echo "10) $(menu_item "simple-scan")"
  1848. echo "11) $(menu_item "yacreader")"
  1849. echo ""
  1850. echo " b) BACK"
  1851. echo ""
  1852. GRAPHICS_OPTIONS+=" b"
  1853. read_input_options "$GRAPHICS_OPTIONS"
  1854. for OPT in ${OPTIONS[@]}; do
  1855. case "$OPT" in
  1856. 1)
  1857. package_install "blender"
  1858. ;;
  1859. 2)
  1860. package_install "gimp"
  1861. ;;
  1862. 3)
  1863. package_install "gthumb"
  1864. ;;
  1865. 4)
  1866. package_install "inkscape python2-numpy python-lxml"
  1867. ;;
  1868. 5)
  1869. package_install "mcomix"
  1870. ;;
  1871. 6)
  1872. package_install "mypaint"
  1873. ;;
  1874. 7)
  1875. aur_package_install "pencil"
  1876. ;;
  1877. 8)
  1878. package_install "scribus"
  1879. ;;
  1880. 9)
  1881. package_install "shotwell"
  1882. ;;
  1883. 10)
  1884. package_install "simple-scan"
  1885. ;;
  1886. 11)
  1887. package_install "yacreader"
  1888. ;;
  1889. "b")
  1890. break
  1891. ;;
  1892. *)
  1893. invalid_option
  1894. ;;
  1895. esac
  1896. done
  1897. source sharedfuncs_elihw
  1898. done
  1899. }
  1900. #}}}
  1901. #INTERNET {{{
  1902. install_internet_apps(){
  1903. while true
  1904. do
  1905. print_title "INTERNET APPS"
  1906. echo " 1) Browser"
  1907. echo " 2) Download|Fileshare"
  1908. echo " 3) Email|RSS"
  1909. echo " 4) Instant Messaging|IRC"
  1910. echo " 5) Mapping Tools"
  1911. echo " 6) VNC|Desktop Share"
  1912. echo ""
  1913. echo " b) BACK"
  1914. echo ""
  1915. INTERNET_OPTIONS+=" b"
  1916. read_input_options "$INTERNET_OPTIONS"
  1917. for OPT in ${OPTIONS[@]}; do
  1918. case "$OPT" in
  1919. 1)
  1920. #BROWSER {{{
  1921. while true
  1922. do
  1923. print_title "BROWSER"
  1924. echo " 1) $(menu_item "google-chrome" "Chrome") $AUR"
  1925. echo " 2) $(menu_item "chromium")"
  1926. echo " 3) $(menu_item "firefox")"
  1927. echo " 4) $(menu_item "midori konqueror" "$([[ ${KDE} -eq 1 ]] && echo "Konqueror" || echo "Midori";)")"
  1928. echo " 5) $(menu_item "opera")"
  1929. echo " 6) $(menu_item "vivaldi") $AUR"
  1930. echo " 7) $(menu_item "tor browser") $AUR"
  1931. echo ""
  1932. echo " b) BACK"
  1933. echo ""
  1934. BROWSERS_OPTIONS+=" b"
  1935. read_input_options "$BROWSERS_OPTIONS"
  1936. for OPT in ${OPTIONS[@]}; do
  1937. case "$OPT" in
  1938. 1)
  1939. aur_package_install "google-chrome"
  1940. ;;
  1941. 2)
  1942. package_install "chromium"
  1943. ;;
  1944. 3)
  1945. package_install "firefox firefox-i18n-$LOCALE_FF"
  1946. ;;
  1947. 4)
  1948. if [[ ${KDE} -eq 1 ]]; then
  1949. package_install "konqueror"
  1950. else
  1951. package_install "midori"
  1952. fi
  1953. ;;
  1954. 5)
  1955. package_install "opera"
  1956. ;;
  1957. 6)
  1958. aur_package_install "vivaldi"
  1959. ;;
  1960. 7)
  1961. aur_package_install "tor-browser"
  1962. ;;
  1963. "b")
  1964. break
  1965. ;;
  1966. *)
  1967. invalid_option
  1968. ;;
  1969. esac
  1970. done
  1971. source sharedfuncs_elihw
  1972. done
  1973. #}}}
  1974. OPT=1
  1975. ;;
  1976. 2)
  1977. #DOWNLOAD|FILESHARE {{{
  1978. while true
  1979. do
  1980. print_title "DOWNLOAD|FILESHARE"
  1981. echo " 1) $(menu_item "deluge")"
  1982. echo " 2) $(menu_item "dropbox") $AUR"
  1983. echo " 3) $(menu_item "flareget") $AUR"
  1984. echo " 4) $(menu_item "google-drive-ocamlfuse", "Google Drive OCamlFuse") $AUR"
  1985. echo " 5) $(menu_item "jdownloader") $AUR"
  1986. echo " 6) $(menu_item "qbittorrent")"
  1987. echo " 7) $(menu_item "nitroshare") $AUR"
  1988. echo " 8) $(menu_item "rslsync" "Resilio Sync") $AUR"
  1989. echo " 9) $(menu_item "sparkleshare")"
  1990. echo "10) $(menu_item "spideroak-one") $AUR"
  1991. echo "11) $(menu_item "tixati") $AUR"
  1992. echo "12) $(menu_item "transmission-qt transmission-gtk" "Transmission")"
  1993. echo "13) $(menu_item "uget")"
  1994. echo "14) $(menu_item "youtube-dl")"
  1995. echo ""
  1996. echo " b) BACK"
  1997. echo ""
  1998. DOWNLOAD_OPTIONS+=" b"
  1999. read_input_options "$DOWNLOAD_OPTIONS"
  2000. for OPT in ${OPTIONS[@]}; do
  2001. case "$OPT" in
  2002. 1)
  2003. package_install "deluge"
  2004. ;;
  2005. 2)
  2006. aur_package_install "dropbox"
  2007. ;;
  2008. 3)
  2009. aur_package_install "flareget"
  2010. ;;
  2011. 4)
  2012. aur_package_install "google-drive-ocamlfuse"
  2013. ;;
  2014. 5)
  2015. aur_package_install "jdownloader"
  2016. ;;
  2017. 6)
  2018. package_install "qbittorrent"
  2019. ;;
  2020. 7)
  2021. package_install "nitroshare"
  2022. ;;
  2023. 8)
  2024. aur_package_install "rslsync"
  2025. ;;
  2026. 9)
  2027. package_install "sparkleshare"
  2028. ;;
  2029. 10)
  2030. aur_package_install "spideroak"
  2031. ;;
  2032. 11)
  2033. aur_package_install "tixati"
  2034. ;;
  2035. 12)
  2036. if [[ ${KDE} -eq 1 ]]; then
  2037. package_install "transmission-qt"
  2038. else
  2039. package_install "transmission-gtk"
  2040. fi
  2041. if [[ -f /home/${username}/.config/transmission/settings.json ]]; then
  2042. replace_line '"blocklist-enabled": false' '"blocklist-enabled": true' /home/${username}/.config/transmission/settings.json
  2043. replace_line "www\.example\.com\/blocklist" "list\.iblocklist\.com\/\?list=bt_level1&fileformat=p2p&archiveformat=gz" /home/${username}/.config/transmission/settings.json
  2044. fi
  2045. ;;
  2046. 13)
  2047. package_install "uget"
  2048. ;;
  2049. 14)
  2050. package_install "youtube-dl"
  2051. ;;
  2052. "b")
  2053. break
  2054. ;;
  2055. *)
  2056. invalid_option
  2057. ;;
  2058. esac
  2059. done
  2060. source sharedfuncs_elihw
  2061. done
  2062. #}}}
  2063. OPT=2
  2064. ;;
  2065. 3)
  2066. #EMAIL {{{
  2067. while true
  2068. do
  2069. print_title "EMAIL|RSS"
  2070. echo " 1) $(menu_item "liferea")"
  2071. echo " 2) $(menu_item "thunderbird")"
  2072. echo ""
  2073. echo " b) BACK"
  2074. echo ""
  2075. EMAIL_OPTIONS+=" b"
  2076. read_input_options "$EMAIL_OPTIONS"
  2077. for OPT in ${OPTIONS[@]}; do
  2078. case "$OPT" in
  2079. 1)
  2080. package_install "liferea"
  2081. ;;
  2082. 2)
  2083. package_install "thunderbird"
  2084. [[ LOCALE_TB != en_US ]] && package_install "thunderbird-i18n-$LOCALE_TB"
  2085. ;;
  2086. "b")
  2087. break
  2088. ;;
  2089. *)
  2090. invalid_option
  2091. ;;
  2092. esac
  2093. done
  2094. source sharedfuncs_elihw
  2095. done
  2096. #}}}
  2097. OPT=3
  2098. ;;
  2099. 4)
  2100. #IM|IRC {{{
  2101. while true
  2102. do
  2103. print_title "IM - INSTANT MESSAGING"
  2104. echo " 1) $(menu_item "hexchat konversation" "$([[ ${KDE} -eq 1 ]] && echo "Konversation" || echo "Hexchat";)")"
  2105. echo " 2) $(menu_item "irssi")"
  2106. echo " 3) $(menu_item "pidgin")"
  2107. echo " 4) $(menu_item "skypeforlinux-stable-bin" "Skype Stable") $AUR"
  2108. echo " 5) $(menu_item "skypeforlinux-preview-bin" "Skype Preview") $AUR"
  2109. echo " 6) $(menu_item "teamspeak3")"
  2110. echo " 7) $(menu_item "viber") $AUR"
  2111. echo " 8) $(menu_item "telegram-desktop")"
  2112. echo " 9) $(menu_item "qtox")"
  2113. echo " 10) $(menu_item "discord") $AUR"
  2114. echo " 11) $(menu_item "slack") $AUR"
  2115. echo " 12) $(menu_item "vk-messenger") $AUR"
  2116. echo " 13) $(menu_item "zoom") $AUR"
  2117. echo ""
  2118. echo " b) BACK"
  2119. echo ""
  2120. IM_OPTIONS+=" b"
  2121. read_input_options "$IM_OPTIONS"
  2122. for OPT in ${OPTIONS[@]}; do
  2123. case "$OPT" in
  2124. 1)
  2125. if [[ ${KDE} -eq 1 ]]; then
  2126. package_install "konversation"
  2127. else
  2128. package_install "hexchat"
  2129. fi
  2130. ;;
  2131. 2)
  2132. package_install "irssi"
  2133. ;;
  2134. 3)
  2135. package_install "pidgin"
  2136. ;;
  2137. 4)
  2138. aur_package_install "skypeforlinux-stable-bin"
  2139. ;;
  2140. 5)
  2141. aur_package_install "skypeforlinux-preview-bin"
  2142. ;;
  2143. 6)
  2144. package_install "teamspeak3"
  2145. ;;
  2146. 7)
  2147. aur_package_install "viber"
  2148. ;;
  2149. 8)
  2150. package_install "telegram-desktop"
  2151. ;;
  2152. 9)
  2153. package_install "qtox"
  2154. ;;
  2155. 10)
  2156. aur_package_install "discord"
  2157. ;;
  2158. 11)
  2159. aur_package_install "slack"
  2160. ;;
  2161. 12)
  2162. aur_package_install "vk-messanger"
  2163. ;;
  2164. 13)
  2165. aur_package_install "zoom"
  2166. ;;
  2167. "b")
  2168. break
  2169. ;;
  2170. *)
  2171. invalid_option
  2172. ;;
  2173. esac
  2174. done
  2175. source sharedfuncs_elihw
  2176. done
  2177. #}}}
  2178. OPT=4
  2179. ;;
  2180. 5)
  2181. #MAPPING {{{
  2182. while true
  2183. do
  2184. print_title "MAPPING TOOLS"
  2185. echo " 1) $(menu_item "google-earth") $AUR"
  2186. echo " 2) $(menu_item "qgis" "QGIS") $AUR"
  2187. echo ""
  2188. echo " b) BACK"
  2189. echo ""
  2190. MAPPING_OPTIONS+=" b"
  2191. read_input_options "$MAPPING_OPTIONS"
  2192. for OPT in ${OPTIONS[@]}; do
  2193. case "$OPT" in
  2194. 1)
  2195. aur_package_install "google-earth"
  2196. ;;
  2197. 2)
  2198. aur_package_install "qgis"
  2199. ;;
  2200. "b")
  2201. break
  2202. ;;
  2203. *)
  2204. invalid_option
  2205. ;;
  2206. esac
  2207. done
  2208. source sharedfuncs_elihw
  2209. done
  2210. #}}}
  2211. OPT=5
  2212. ;;
  2213. 6)
  2214. #DESKTOP SHARE {{{
  2215. while true
  2216. do
  2217. print_title "DESKTOP SHARE"
  2218. echo " 1) $(menu_item "remmina")"
  2219. echo " 2) $(menu_item "teamviewer") $AUR"
  2220. echo ""
  2221. echo " b) BACK"
  2222. echo ""
  2223. VNC_OPTIONS+=" b"
  2224. read_input_options "$VNC_OPTIONS"
  2225. for OPT in ${OPTIONS[@]}; do
  2226. case "$OPT" in
  2227. 1)
  2228. package_install "remmina"
  2229. ;;
  2230. 2)
  2231. aur_package_install "teamviewer"
  2232. ;;
  2233. "b")
  2234. break
  2235. ;;
  2236. *)
  2237. invalid_option
  2238. ;;
  2239. esac
  2240. done
  2241. source sharedfuncs_elihw
  2242. done
  2243. #}}}
  2244. OPT=6
  2245. ;;
  2246. "b")
  2247. break
  2248. ;;
  2249. *)
  2250. invalid_option
  2251. ;;
  2252. esac
  2253. done
  2254. source sharedfuncs_elihw
  2255. done
  2256. }
  2257. #}}}
  2258. #AUDIO {{{
  2259. install_audio_apps(){
  2260. while true
  2261. do
  2262. print_title "AUDIO APPS"
  2263. echo " 1) Players"
  2264. echo " 2) Editors|Tools"
  2265. echo " 3) Codecs"
  2266. echo ""
  2267. echo " b) BACK"
  2268. echo ""
  2269. AUDIO_OPTIONS+=" b"
  2270. read_input_options "$AUDIO_OPTIONS"
  2271. for OPT in ${OPTIONS[@]}; do
  2272. case "$OPT" in
  2273. 1)
  2274. #PLAYERS {{{
  2275. while true
  2276. do
  2277. print_title "AUDIO PLAYERS"
  2278. echo " 1) $(menu_item "amarok")"
  2279. echo " 2) $(menu_item "audacious")"
  2280. echo " 3) $(menu_item "clementine")"
  2281. echo " 4) $(menu_item "deadbeef")"
  2282. echo " 5) $(menu_item "guayadeque") $AUR"
  2283. echo " 6) $(menu_item "musique") $AUR"
  2284. echo " 7) $(menu_item "pragha")"
  2285. echo " 8) $(menu_item "rhythmbox")"
  2286. echo " 9) $(menu_item "spotify") $AUR"
  2287. echo "10) $(menu_item "timidity++") $AUR"
  2288. echo "11) $(menu_item "quodlibet")"
  2289. echo ""
  2290. echo " b) BACK"
  2291. echo ""
  2292. AUDIO_PLAYER_OPTIONS+=" b"
  2293. read_input_options "$AUDIO_PLAYER_OPTIONS"
  2294. for OPT in ${OPTIONS[@]}; do
  2295. case "$OPT" in
  2296. 1)
  2297. package_install "amarok"
  2298. ;;
  2299. 2)
  2300. package_install "audacious audacious-plugins"
  2301. ;;
  2302. 3)
  2303. package_install "clementine"
  2304. ;;
  2305. 4)
  2306. package_install "deadbeef"
  2307. ;;
  2308. 5)
  2309. aur_package_install "guayadeque"
  2310. ;;
  2311. 6)
  2312. aur_package_install "musique"
  2313. ;;
  2314. 7)
  2315. package_install "pragha"
  2316. ;;
  2317. 8)
  2318. package_install "rhythmbox grilo grilo-plugins libgpod libdmapsharing gnome-python python-mako"
  2319. ;;
  2320. 9)
  2321. aur_package_install "spotify"
  2322. ;;
  2323. 10)
  2324. aur_package_install "timidity++ fluidr3"
  2325. echo -e 'soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2' >> /etc/timidity++/timidity.cfg
  2326. ;;
  2327. 11)
  2328. package_install "quodlibet"
  2329. ;;
  2330. "b")
  2331. break
  2332. ;;
  2333. *)
  2334. invalid_option
  2335. ;;
  2336. esac
  2337. done
  2338. source sharedfuncs_elihw
  2339. done
  2340. #}}}
  2341. OPT=1
  2342. ;;
  2343. 2)
  2344. #EDITORS {{{
  2345. while true
  2346. do
  2347. print_title "AUDIO EDITORS|TOOLS"
  2348. echo " 1) $(menu_item "audacity")"
  2349. echo " 2) $(menu_item "easytag")"
  2350. echo " 3) $(menu_item "ocenaudio-bin") $AUR"
  2351. echo " 4) $(menu_item "soundconverter soundkonverter" "$([[ ${KDE} -eq 1 ]] && echo "Soundkonverter" || echo "Soundconverter";)")"
  2352. echo ""
  2353. echo " b) BACK"
  2354. echo ""
  2355. AUDIO_EDITOR_OPTIONS+=" b"
  2356. read_input_options "$AUDIO_EDITOR_OPTIONS"
  2357. for OPT in ${OPTIONS[@]}; do
  2358. case "$OPT" in
  2359. 1)
  2360. package_install "audacity"
  2361. ;;
  2362. 2)
  2363. package_install "easytag"
  2364. ;;
  2365. 3)
  2366. aur_package_install "ocenaudio-bin"
  2367. ;;
  2368. 4)
  2369. if [[ ${KDE} -eq 1 ]]; then
  2370. package_install "soundkonverter"
  2371. else
  2372. package_install "soundconverter"
  2373. fi
  2374. ;;
  2375. "b")
  2376. break
  2377. ;;
  2378. *)
  2379. invalid_option
  2380. ;;
  2381. esac
  2382. done
  2383. source sharedfuncs_elihw
  2384. done
  2385. #}}}
  2386. OPT=2
  2387. ;;
  2388. 3)
  2389. package_install "gst-plugins-base gst-plugins-base-libs gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav"
  2390. [[ ${KDE} -eq 1 ]] && package_install "phonon-qt5-gstreamer"
  2391. # Use the 'standard' preset by default. This preset should generally be
  2392. # transparent to most people on most music and is already quite high in quality.
  2393. # The resulting bitrate should be in the 170-210kbps range, according to music
  2394. # complexity.
  2395. run_as_user "gconftool-2 --type string --set /system/gstreamer/0.10/audio/profiles/mp3/pipeline \audio/x-raw-int,rate=44100,channels=2 ! lame name=enc preset=1001 ! id3v2mux\""
  2396. ;;
  2397. "b")
  2398. break
  2399. ;;
  2400. *)
  2401. invalid_option
  2402. ;;
  2403. esac
  2404. done
  2405. source sharedfuncs_elihw
  2406. done
  2407. }
  2408. #}}}
  2409. #VIDEO {{{
  2410. install_video_apps(){
  2411. while true
  2412. do
  2413. print_title "VIDEO APPS"
  2414. echo " 1) Players"
  2415. echo " 2) Editors|Tools"
  2416. echo " 3) Codecs"
  2417. echo ""
  2418. echo " b) BACK"
  2419. echo ""
  2420. VIDEO_OPTIONS+=" b"
  2421. read_input_options "$VIDEO_OPTIONS"
  2422. for OPT in ${OPTIONS[@]}; do
  2423. case "$OPT" in
  2424. 1)
  2425. #PLAYERS {{{
  2426. while true
  2427. do
  2428. print_title "VIDEO PLAYERS"
  2429. echo " 1) $(menu_item "gnome-mplayer")"
  2430. echo " 2) $(menu_item "livestreamer")"
  2431. echo " 3) $(menu_item "minitube")"
  2432. echo " 4) $(menu_item "mpv")"
  2433. echo " 5) $(menu_item "parole")"
  2434. echo " 6) $(menu_item "plex-media-server" "Plex") $AUR"
  2435. echo " 7) $(menu_item "popcorntime-ce") $AUR"
  2436. echo " 8) $(menu_item "vlc")"
  2437. echo " 9) $(menu_item "kodi")"
  2438. echo ""
  2439. echo " b) BACK"
  2440. echo ""
  2441. VIDEO_PLAYER_OPTIONS+=" b"
  2442. read_input_options "$VIDEO_PLAYER_OPTIONS"
  2443. for OPT in ${OPTIONS[@]}; do
  2444. case "$OPT" in
  2445. 1)
  2446. package_install "gnome-mplayer"
  2447. ;;
  2448. 2)
  2449. package_install "livestreamer"
  2450. ;;
  2451. 3)
  2452. package_install "minitube"
  2453. ;;
  2454. 4)
  2455. package_install "mpv"
  2456. ;;
  2457. 5)
  2458. package_install "parole"
  2459. ;;
  2460. 6)
  2461. aur_package_install "plex-media-server"
  2462. system_ctl enable plexmediaserver.service
  2463. ;;
  2464. 7)
  2465. aur_package_install "popcorntime-ce"
  2466. ;;
  2467. 8)
  2468. package_install "vlc"
  2469. ;;
  2470. 9)
  2471. package_install "kodi"
  2472. add_user_to_group ${username} kodi
  2473. ;;
  2474. "b")
  2475. break
  2476. ;;
  2477. *)
  2478. invalid_option
  2479. ;;
  2480. esac
  2481. done
  2482. source sharedfuncs_elihw
  2483. done
  2484. #}}}
  2485. OPT=1
  2486. ;;
  2487. 2)
  2488. #EDITORS {{{
  2489. while true
  2490. do
  2491. print_title "VIDEO EDITORS|TOOLS"
  2492. echo " 1) $(menu_item "arista") $AUR"
  2493. echo " 2) $(menu_item "avidemux-gtk avidemux-qt" "Avidemux")"
  2494. echo " 3) $(menu_item "filebot") $AUR"
  2495. echo " 4) $(menu_item "handbrake")"
  2496. echo " 5) $(menu_item "kdenlive")"
  2497. echo " 6) $(menu_item "lwks" "Lightworks") $AUR"
  2498. echo " 7) $(menu_item "openshot")"
  2499. echo " 8) $(menu_item "pitivi")"
  2500. echo " 9) $(menu_item "transmageddon")"
  2501. echo ""
  2502. echo " b) BACK"
  2503. echo ""
  2504. VIDEO_EDITOR_OPTIONS+=" b"
  2505. read_input_options "$VIDEO_EDITOR_OPTIONS"
  2506. for OPT in ${OPTIONS[@]}; do
  2507. case "$OPT" in
  2508. 1)
  2509. aur_package_install "arista"
  2510. ;;
  2511. 2)
  2512. if [[ ${KDE} -eq 1 ]]; then
  2513. package_install "avidemux-qt"
  2514. else
  2515. package_install "avidemux-gtk"
  2516. fi
  2517. ;;
  2518. 3)
  2519. aur_package_install "filebot"
  2520. ;;
  2521. 4)
  2522. package_install "handbrake"
  2523. ;;
  2524. 5)
  2525. package_install "kdenlive"
  2526. ;;
  2527. 6)
  2528. aur_package_install "lwks"
  2529. ;;
  2530. 7)
  2531. package_install "openshot"
  2532. ;;
  2533. 8)
  2534. package_install "pitivi frei0r-plugins"
  2535. ;;
  2536. 9)
  2537. package_install "transmageddon"
  2538. ;;
  2539. "b")
  2540. break
  2541. ;;
  2542. *)
  2543. invalid_option
  2544. ;;
  2545. esac
  2546. done
  2547. source sharedfuncs_elihw
  2548. done
  2549. #}}}
  2550. OPT=2
  2551. ;;
  2552. 3)
  2553. package_install "libdvdnav libdvdcss cdrdao cdrtools ffmpeg ffmpegthumbnailer ffmpegthumbs"
  2554. if [[ ${KDE} -eq 1 ]]; then
  2555. package_install "kdegraphics-thumbnailers"
  2556. fi
  2557. ;;
  2558. "b")
  2559. break
  2560. ;;
  2561. *)
  2562. invalid_option
  2563. ;;
  2564. esac
  2565. done
  2566. source sharedfuncs_elihw
  2567. done
  2568. }
  2569. #}}}
  2570. #GAMES {{{
  2571. install_games(){
  2572. while true
  2573. do
  2574. print_title "GAMES - https://wiki.archlinux.org/index.php/Games"
  2575. echo " 1) Desura $AUR"
  2576. echo " 2) PlayOnLinux $AUR"
  2577. echo " 3) Steam"
  2578. echo " 4) Minecraft"
  2579. echo ""
  2580. echo " b) BACK"
  2581. echo ""
  2582. GAMES_OPTIONS+=" b"
  2583. read_input_options "$GAMES_OPTIONS"
  2584. for OPT in ${OPTIONS[@]}; do
  2585. case "$OPT" in
  2586. 1)
  2587. aur_package_install "desura"
  2588. OPT=1
  2589. ;;
  2590. 2)
  2591. aur_package_install "playonlinux"
  2592. OPT=2
  2593. ;;
  2594. 3)
  2595. package_install "steam"
  2596. OPT=3
  2597. ;;
  2598. 4)
  2599. aur_package_install "minecraft"
  2600. OPT=4
  2601. ;;
  2602. "b")
  2603. break
  2604. ;;
  2605. *)
  2606. invalid_option
  2607. ;;
  2608. esac
  2609. done
  2610. source sharedfuncs_elihw
  2611. done
  2612. }
  2613. #}}}
  2614. #WEBSERVER {{{
  2615. install_web_server(){
  2616. install_adminer(){ #{{{
  2617. aur_package_install "adminer"
  2618. local ADMINER=`cat /etc/httpd/conf/httpd.conf | grep Adminer`
  2619. [[ -z $ADMINER ]] && echo -e '\n# Adminer Configuration\nInclude conf/extra/httpd-adminer.conf' >> /etc/httpd/conf/httpd.conf
  2620. } #}}}
  2621.  
  2622. install_mariadb(){ #{{{
  2623. package_install "mariadb"
  2624. /usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
  2625. system_ctl enable mysqld.service
  2626. systemctl start mysqld.service
  2627. /usr/bin/mysql_secure_installation
  2628. } #}}}
  2629.  
  2630. install_postgresql(){ #{{{
  2631. package_install "postgresql"
  2632. mkdir -p /var/lib/postgres
  2633. chown -R postgres:postgres /var/lib/postgres
  2634. systemd-tmpfiles --create postgresql.conf
  2635. echo "Enter your new postgres account password:"
  2636. passwd postgres
  2637. while [[ $? -ne 0 ]]; do
  2638. passwd postgres
  2639. done
  2640. su - postgres -c "initdb --locale ${LOCALE}.UTF-8 -D /var/lib/postgres/data"
  2641. system_ctl enable postgresql.service
  2642. system_ctl start postgresql.service
  2643. read_input_text "Install Postgis + Pgrouting" $POSTGIS
  2644. [[ $OPTION == y ]] && install_gis_extension
  2645. } #}}}
  2646.  
  2647. install_gis_extension(){ #{{{
  2648. package_install "postgis"
  2649. aur_package_install "pgrouting"
  2650. } #}}}
  2651.  
  2652. configure_php(){ #{{{
  2653. if [[ -f /etc/php/php.ini.pacnew ]]; then
  2654. mv -v /etc/php/php.ini /etc/php/php.ini.pacold
  2655. mv -v /etc/php/php.ini.pacnew /etc/php/php.ini
  2656. rm -v /etc/php/php.ini.aui
  2657. fi
  2658. [[ -f /etc/php/php.ini.aui ]] && echo "/etc/php/php.ini.aui" || cp -v /etc/php/php.ini /etc/php/php.ini.aui
  2659. if [[ $1 == mariadb ]]; then
  2660. sed -i '/mysqli.so/s/^;//' /etc/php/php.ini
  2661. sed -i '/mysql.so/s/^;//' /etc/php/php.ini
  2662. sed -i '/skip-networking/s/^/#/' /etc/mysql/my.cnf
  2663. else
  2664. sed -i '/pgsql.so/s/^;//' /etc/php/php.ini
  2665. fi
  2666. sed -i '/mcrypt.so/s/^;//' /etc/php/php.ini
  2667. sed -i '/gd.so/s/^;//' /etc/php/php.ini
  2668. sed -i '/display_errors=/s/off/on/' /etc/php/php.ini
  2669. } #}}}
  2670.  
  2671. configure_php_apache(){ #{{{
  2672. if [[ -f /etc/httpd/conf/httpd.conf.pacnew ]]; then
  2673. mv -v /etc/httpd/conf/httpd.conf.pacnew /etc/httpd/conf/httpd.conf
  2674. rm -v /etc/httpd/conf/httpd.conf.aui
  2675. fi
  2676. [[ -f /etc/httpd/conf/httpd.conf.aui ]] && echo "/etc/httpd/conf/httpd.conf.aui" || cp -v /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.aui
  2677. local IS_DISABLED=`cat /etc/httpd/conf/httpd.conf | grep php5_module.conf`
  2678. if [[ -z $IS_DISABLED ]]; then
  2679. echo -e 'application/x-httpd-php5 php php5' >> /etc/httpd/conf/mime.types
  2680. sed -i '/LoadModule dir_module modules\/mod_dir.so/a\LoadModule php5_module modules\/libphp5.so' /etc/httpd/conf/httpd.conf
  2681. echo -e '\n# Use for PHP 5.x:\nInclude conf/extra/php5_module.conf\n\nAddHandler php5-script php' >> /etc/httpd/conf/httpd.conf
  2682. # libphp5.so included with php-apache does not work with mod_mpm_event (FS#39218). You'll have to use mod_mpm_prefork instead
  2683. replace_line 'LoadModule mpm_event_module modules/mod_mpm_event.so' 'LoadModule mpm_prefork_module modules/mod_mpm_prefork.so' /etc/httpd/conf/httpd.conf
  2684. replace_line 'DirectoryIndex\ index.html' 'DirectoryIndex\ index.html\ index.php' /etc/httpd/conf/httpd.conf
  2685. fi
  2686. } #}}}
  2687.  
  2688. configure_php_nginx(){ #{{{
  2689. if [[ -f /etc/nginx/nginx.conf.pacnew ]]; then
  2690. mv -v /etc/nginx/nginx.conf.pacnew /etc/nginx/nginx.conf
  2691. rm -v /etc/nginx/nginx.conf.aui
  2692. fi
  2693. [[ -f /etc/nginx/nginx.conf.aui ]] && cp -v /etc/nginx/nginx.conf.aui /etc/nginx/nginx.conf || cp -v /etc/nginx/nginx.conf /etc/nginx/nginx.conf.aui
  2694. sed -i -e '/location ~ \.php$ {/,/}/d' /etc/nginx/nginx.conf
  2695. sed -i -e '/pass the PHP/a\ #\n location ~ \.php$ {\n fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;\n fastcgi_index index.php;\n root /srv/http;\n include fastcgi.conf;\n }' /etc/nginx/nginx.conf
  2696. } #}}}
  2697.  
  2698. create_sites_folder(){ #{{{
  2699. [[ ! -f /etc/httpd/conf/extra/httpd-userdir.conf.aui ]] && cp -v /etc/httpd/conf/extra/httpd-userdir.conf /etc/httpd/conf/extra/httpd-userdir.conf.aui
  2700. replace_line 'public_html' 'Sites' /etc/httpd/conf/extra/httpd-userdir.conf
  2701. su - ${username} -c "mkdir -p ~/Sites"
  2702. su - ${username} -c "chmod o+x ~/ && chmod -R o+x ~/Sites"
  2703. print_line
  2704. echo "The folder \"Sites\" has been created in your home"
  2705. echo "You can access your projects at \"http://localhost/~username\""
  2706. pause_function
  2707. } #}}}
  2708.  
  2709. print_title "WEB SERVER - https://wiki.archlinux.org/index.php/LAMP|LAPP"
  2710. print_info "*Adminer is installed by default in all options"
  2711. echo " 1) LAMP - APACHE, MariaDB & PHP"
  2712. echo " 2) LAPP - APACHE, POSTGRESQL & PHP"
  2713. echo " 3) LEMP - NGINX, MariaDB & PHP"
  2714. echo " 4) LEPP - NGINX, POSTGRESQL & PHP"
  2715. echo ""
  2716. echo " b) BACK"
  2717. echo ""
  2718. read_input $WEBSERVER
  2719. case "$OPTION" in
  2720. 1)
  2721. package_install "apache php php-apache php-mcrypt php-gd"
  2722. install_mariadb
  2723. install_adminer
  2724. system_ctl enable httpd.service
  2725. configure_php_apache
  2726. configure_php "mariadb"
  2727. create_sites_folder
  2728. ;;
  2729. 2)
  2730. package_install "apache php php-apache php-pgsql php-gd"
  2731. install_postgresql
  2732. install_adminer
  2733. system_ctl enable httpd.service
  2734. configure_php_apache
  2735. configure_php "postgresql"
  2736. create_sites_folder
  2737. ;;
  2738. 3)
  2739. package_install "nginx php php-mcrypt php-fpm"
  2740. install_mariadb
  2741. system_ctl enable nginx.service
  2742. system_ctl enable php-fpm.service
  2743. configure_php_nginx
  2744. configure_php "mariadb"
  2745. ;;
  2746. 4)
  2747. package_install "nginx php php-fpm php-pgsql"
  2748. install_postgresql
  2749. system_ctl enable nginx.service
  2750. system_ctl enable php-fpm.service
  2751. configure_php_nginx
  2752. configure_php "postgresql"
  2753. ;;
  2754. esac
  2755. }
  2756. #}}}
  2757. #FONTS {{{
  2758. install_fonts(){
  2759. while true
  2760. do
  2761. print_title "FONTS - https://wiki.archlinux.org/index.php/Fonts"
  2762. echo " 1) $(menu_item "ttf-dejavu")"
  2763. echo " 2) $(menu_item "ttf-fira-code") $AUR"
  2764. echo " 3) $(menu_item "ttf-google-fonts-git") $AUR"
  2765. echo " 4) $(menu_item "ttf-liberation")"
  2766. echo " 5) $(menu_item "ttf-bitstream-vera")"
  2767. echo " 6) $(menu_item "ttf-hack")"
  2768. echo " 7) $(menu_item "ttf-mac-fonts") $AUR"
  2769. echo " 8) $(menu_item "ttf-ms-fonts") $AUR"
  2770. echo " 9) $(menu_item "wqy-microhei") (Chinese/Japanese/Korean Support)"
  2771. echo "10) $(menu_item "noto-fonts-cjk") (Chinese/Japanese/Korean Support)"
  2772. echo ""
  2773. echo " b) BACK"
  2774. echo ""
  2775. FONTS_OPTIONS+=" b"
  2776. read_input_options "$FONTS_OPTIONS"
  2777. for OPT in ${OPTIONS[@]}; do
  2778. case "$OPT" in
  2779. 1)
  2780. package_install "ttf-dejavu"
  2781. ;;
  2782. 2)
  2783. aur_package_install "ttf-fira-code"
  2784. ;;
  2785. 3)
  2786. package_remove "ttf-droid"
  2787. package_remove "ttf-roboto"
  2788. package_remove "ttf-ubuntu-font-family"
  2789. package_remove "otf-oswald-ib"
  2790. aur_package_install "ttf-google-fonts-git"
  2791. ;;
  2792. 4)
  2793. package_install "ttf-liberation"
  2794. ;;
  2795. 5)
  2796. package_install "ttf-bitstream-vera"
  2797. ;;
  2798. 6)
  2799. package_install "ttf-hack"
  2800. ;;
  2801. 7)
  2802. aur_package_install "ttf-mac-fonts"
  2803. ;;
  2804. 8)
  2805. aur_package_install "ttf-ms-fonts"
  2806. ;;
  2807. 9)
  2808. package_install "wqy-microhei"
  2809. ;;
  2810. 10)
  2811. package_install "noto-fonts-cjk"
  2812. ;;
  2813. "b")
  2814. break
  2815. ;;
  2816. *)
  2817. invalid_option
  2818. ;;
  2819. esac
  2820. done
  2821. source sharedfuncs_elihw
  2822. done
  2823. }
  2824. #}}}
  2825. #IME INPUT TOOLS {{{
  2826. choose_ime_m17n(){
  2827. while true
  2828. do
  2829. print_title "INTERNATIONALIZATION - https://wiki.archlinux.org/index.php/Internationalization"
  2830. echo " 1) $(menu_item "fcitx")"
  2831. echo " 2) $(menu_item "ibus")"
  2832. echo ""
  2833. echo " b) BACK"
  2834. echo ""
  2835. IME_OPTIONS+=" b"
  2836. read_input_options "IME_OPTIONS"
  2837. for OPT in ${OPTIONS[@]}; do
  2838. case "$OPT" in
  2839. 1)
  2840. package_install "fcitx"
  2841. package_install "fcitx-m17n"
  2842. package_install "fcitx-qt4"
  2843. package_install "fcitx-qt5"
  2844. package_install "fcitx-gtk2"
  2845. package_install "fcitx-gtk3"
  2846. package_install "kcm-fcitx"
  2847. package_install "fcitx-configtool"
  2848. echo -e '#!/bin/sh\n\n\n# Identify fcitx as a input module for both GTK and QT apps\nXMODIFIERS=@im=fcitx\nGTK_IM_MODULE=fcitx\nQT_IM_MODULE=fcitx\n\nexport XMODIFIERS GTK_IM_MODULE QT_IM_MODULE\necho we set XMODIFIERS GTK_IM_MODULE QT_IM_MODULE in profile.d\n' > /etc/profile.d/ime.sh
  2849. # echo -e '#!/bin/sh\n\n\n# Identify fcitx as a input module for both GTK and QT apps\nXMODIFIERS=@im=fcitx\nGTK_IM_MODULE=fcitx\nQT_IM_MODULE=fcitx\n\nexport XMODIFIERS GTK_IM_MODULE QT_IM_MODULE\necho we set XMODIFIERS GTK_IM_MODULE QT_IM_MODULE in xprofile\n' > /etc/xprofile
  2850. ;;
  2851. 2)
  2852. package_install "ibus"
  2853. package_install "ibus-m17n"
  2854. package_install "ibus-qt"
  2855. echo -e '#!/bin/sh\n\n\n# Identify ibus as a input module for both GTK and QT apps\nXMODIFIERS=@im=ibus\nGTK_IM_MODULE=ibus\nQT_IM_MODULE=ibus\n\nexport XMODIFIERS GTK_IM_MODULE QT_IM_MODULE\necho we set XMODIFIERS GTK_IM_MODULE QT_IM_MODULE in profile.d\n' > /etc/profile.d/ime.sh
  2856. ;;
  2857. "b")
  2858. break
  2859. ;;
  2860. *)
  2861. invalid_option
  2862. ;;
  2863. esac
  2864. done
  2865. source sharedfuncs_elihw
  2866. done
  2867. }
  2868. #}}}
  2869. #CLEAN ORPHAN PACKAGES {{{
  2870. clean_orphan_packages(){
  2871. print_title "CLEAN ORPHAN PACKAGES"
  2872. pacman -Rsc --noconfirm $(pacman -Qqdt)
  2873. #pacman -Sc --noconfirm
  2874. pacman-optimize
  2875. }
  2876. #}}}
  2877. #RECONFIGURE SYSTEM {{{
  2878. reconfigure_system(){
  2879. print_title "HOSTNAME - https://wiki.archlinux.org/index.php/HOSTNAME"
  2880. print_info "A host name is a unique name created to identify a machine on a network.Host names are restricted to alphanumeric characters.\nThe hyphen (-) can be used, but a host name cannot start or end with it. Length is restricted to 63 characters."
  2881. read -p "Hostname [ex: archlinux]: " HN
  2882. hostnamectl set-hostname $HN
  2883.  
  2884. print_title "TIMEZONE - https://wiki.archlinux.org/index.php/Timezone"
  2885. print_info "In an operating system the time (clock) is determined by four parts: Time value, Time standard, Time Zone, and DST (Daylight Saving Time if applicable)."
  2886. OPTION=n
  2887. while [[ $OPTION != y ]]; do
  2888. settimezone
  2889. read_input_text "Confirm timezone ($ZONE/$SUBZONE)"
  2890. done
  2891. timedatectl set-timezone ${ZONE}/${SUBZONE}
  2892.  
  2893. print_title "HARDWARE CLOCK TIME - https://wiki.archlinux.org/index.php/Internationalization"
  2894. print_info "This is set in /etc/adjtime. Set the hardware clock mode uniformly between your operating systems on the same machine. Otherwise, they will overwrite the time and cause clock shifts (which can cause time drift correction to be miscalibrated)."
  2895. hwclock_list=('UTC' 'Localtime');
  2896. PS3="$prompt1"
  2897. select OPT in "${hwclock_list[@]}"; do
  2898. case "$REPLY" in
  2899. 1)
  2900. timedatectl set-local-rtc false
  2901. ;;
  2902. 2)
  2903. timedatectl set-local-rtc true
  2904. ;;
  2905. *) invalid_option ;;
  2906. esac
  2907. [[ -n $OPT ]] && break
  2908. done
  2909. timedatectl set-ntp true
  2910. }
  2911. #}}}
  2912. #EXTRA {{{
  2913. install_extra(){
  2914. while true
  2915. do
  2916. print_title "EXTRA"
  2917. echo " 1) $(menu_item "profile-sync-daemon") $AUR"
  2918. echo ""
  2919. echo " b) BACK"
  2920. echo ""
  2921. EXTRA_OPTIONS+=" b"
  2922. read_input_options "$EXTRA_OPTIONS"
  2923. for OPT in ${OPTIONS[@]}; do
  2924. case "$OPT" in
  2925. 1)
  2926. aur_package_install "profile-sync-daemon"
  2927. run_as_user "psd"
  2928. run_as_user "$EDITOR /home/${username}/.config/psd/psd.conf"
  2929. run_as_user "systemctl --user enable psd.service"
  2930. ;;
  2931. "b")
  2932. break
  2933. ;;
  2934. *)
  2935. invalid_option
  2936. ;;
  2937. esac
  2938. done
  2939. source sharedfuncs_elihw
  2940. done
  2941. }
  2942. #}}}
  2943. #FINISH {{{
  2944. finish(){
  2945. print_title "WARNING: PACKAGES INSTALLED FROM AUR"
  2946. print_danger "List of packages not officially supported that may kill your cat:"
  2947. pause_function
  2948. AUR_PKG_LIST="${AUI_DIR}/aur_pkg_list.log"
  2949. pacman -Qm | awk '{print $1}' > $AUR_PKG_LIST
  2950. less $AUR_PKG_LIST
  2951. print_title "INSTALL COMPLETED"
  2952. echo -e "Thanks for using the Archlinux Ultimate Install script by helmuthdu\n"
  2953. #REBOOT
  2954. read -p "Reboot your system [y/N]: " OPTION
  2955. [[ $OPTION == y ]] && reboot
  2956. exit 0
  2957. }
  2958. #}}}
  2959.  
  2960. welcome
  2961. check_root
  2962. check_archlinux
  2963. check_hostname
  2964. check_connection
  2965. check_pacman_blocked
  2966. check_multilib
  2967. pacman_key
  2968. system_update
  2969. language_selector
  2970. configure_sudo
  2971. select_user
  2972. choose_aurhelper
  2973. automatic_mode
  2974.  
  2975. if is_package_installed "kdebase-workspace"; then KDE=1; fi
  2976.  
  2977. while true
  2978. do
  2979. print_title "ARCHLINUX INSTALL - https://github.com/helmuthdu/aui"
  2980. print_warning "USERNAME: ${username}"
  2981. echo " 1) $(mainmenu_item "${checklist[1]}" "Basic Setup")"
  2982. echo " 2) $(mainmenu_item "${checklist[2]}" "Desktop Environment|Window Manager")"
  2983. echo " 3) $(mainmenu_item "${checklist[3]}" "Accessories Apps")"
  2984. echo " 4) $(mainmenu_item "${checklist[4]}" "Development Apps")"
  2985. echo " 5) $(mainmenu_item "${checklist[5]}" "Office Apps")"
  2986. echo " 6) $(mainmenu_item "${checklist[6]}" "System Apps")"
  2987. echo " 7) $(mainmenu_item "${checklist[7]}" "Graphics Apps")"
  2988. echo " 8) $(mainmenu_item "${checklist[8]}" "Internet Apps")"
  2989. echo " 9) $(mainmenu_item "${checklist[9]}" "Audio Apps")"
  2990. echo "10) $(mainmenu_item "${checklist[10]}" "Video Apps")"
  2991. echo "11) $(mainmenu_item "${checklist[11]}" "Games")"
  2992. echo "12) $(mainmenu_item "${checklist[12]}" "Web server")"
  2993. echo "13) $(mainmenu_item "${checklist[13]}" "Fonts")"
  2994. echo "14) $(mainmenu_item "${checklist[14]}" "Internationalization")"
  2995. echo "15) $(mainmenu_item "${checklist[15]}" "Extra")"
  2996. echo "16) $(mainmenu_item "${checklist[16]}" "Clean Orphan Packages")"
  2997. echo "17) $(mainmenu_item "${checklist[17]}" "Reconfigure System")"
  2998. echo ""
  2999. echo " q) Quit"
  3000. echo ""
  3001. MAINMENU+=" q"
  3002. read_input_options "$MAINMENU"
  3003. for OPT in ${OPTIONS[@]}; do
  3004. case "$OPT" in
  3005. 1)
  3006. add_custom_repositories
  3007. install_basic_setup
  3008. install_zsh
  3009. install_ssh
  3010. install_nfs
  3011. install_samba
  3012. install_tlp
  3013. enable_readahead
  3014. install_zram
  3015. install_video_cards
  3016. install_xorg
  3017. install_wayland
  3018. font_config
  3019. install_cups
  3020. install_additional_firmwares
  3021. checklist[1]=1
  3022. ;;
  3023. 2)
  3024. if [[ checklist[1] -eq 0 ]]; then
  3025. print_danger "\nWARNING: YOU MUST RUN THE BASIC SETUP FIRST"
  3026. read_input_text "Are you sure you want to continue?"
  3027. [[ $OPTION != y ]] && continue
  3028. fi
  3029. install_desktop_environment
  3030. install_nm_wicd
  3031. install_usb_modem
  3032. install_bluetooth
  3033. checklist[2]=1
  3034. ;;
  3035. 3)
  3036. install_accessories_apps
  3037. checklist[3]=1
  3038. ;;
  3039. 4)
  3040. install_development_apps
  3041. checklist[4]=1
  3042. ;;
  3043. 5)
  3044. install_office_apps
  3045. checklist[5]=1
  3046. ;;
  3047. 6)
  3048. install_system_apps
  3049. checklist[6]=1
  3050. ;;
  3051. 7)
  3052. install_graphics_apps
  3053. checklist[7]=1
  3054. ;;
  3055. 8)
  3056. install_internet_apps
  3057. checklist[8]=1
  3058. ;;
  3059. 9)
  3060. install_audio_apps
  3061. checklist[9]=1
  3062. ;;
  3063. 10)
  3064. install_video_apps
  3065. checklist[10]=1
  3066. ;;
  3067. 11)
  3068. install_games
  3069. checklist[11]=1
  3070. ;;
  3071. 12)
  3072. install_web_server
  3073. checklist[12]=1
  3074. ;;
  3075. 13)
  3076. install_fonts
  3077. checklist[13]=1
  3078. ;;
  3079. 14)
  3080. choose_ime_m17n
  3081. checklist[14]=1
  3082. ;;
  3083. 15)
  3084. install_extra
  3085. checklist[15]=1
  3086. ;;
  3087. 16)
  3088. clean_orphan_packages
  3089. checklist[16]=1
  3090. ;;
  3091. 17)
  3092. print_danger "\nWARNING: THIS OPTION WILL RECONFIGURE THINGS LIKE HOSTNAME, TIMEZONE, CLOCK..."
  3093. read_input_text "Are you sure you want to continue?"
  3094. [[ $OPTION != y ]] && continue
  3095. reconfigure_system
  3096. checklist[17]=1
  3097. ;;
  3098. "q")
  3099. finish
  3100. ;;
  3101. *)
  3102. invalid_option
  3103. ;;
  3104. esac
  3105. done
  3106. done
  3107. #}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement