blob: a32a98c0aabb26e53b2d463f771829727716e210 [file] [log] [blame]
#!/bin/bash
#-------------------------------------------------------------------------------
#Created by helmuthdu mailto: helmuthdu[at]gmail[dot]com
#Contribution: flexiondotorg
#-------------------------------------------------------------------------------
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# Run this script after your first boot with archlinux (as root)
if [[ -f `pwd`/sharedfuncs ]]; then
source sharedfuncs
else
echo "missing file: sharedfuncs"
exit 1
fi
#ARCHLINUX ULTIMATE INSTALL {{{
#WELCOME {{{
welcome(){
clear
echo -e "${Bold}Welcome to the Archlinux Ultimate install script by helmuthdu${White}"
print_line
echo "Requirements:"
echo "-> Archlinux installation"
echo "-> Run script as root user"
echo "-> Working internet connection"
print_line
echo "Script can be cancelled at any time with CTRL+C"
print_line
echo "http://www.github.com/helmuthdu/aui"
print_line
echo -e "\nBackups:"
print_line
# backup old configs
[[ ! -f /etc/pacman.conf.aui ]] && cp -v /etc/pacman.conf /etc/pacman.conf.aui || echo "/etc/pacman.conf.aui";
[[ -f /etc/ssh/sshd_config.aui ]] && echo "/etc/ssh/sshd_conf.aui";
[[ -f /etc/sudoers.aui ]] && echo "/etc/sudoers.aui";
pause_function
echo ""
}
#}}}
#LOCALE SELECTOR {{{
language_selector(){
#AUTOMATICALLY DETECTS THE SYSTEM LOCALE {{{
#automatically detects the system language based on your locale
LOCALE=`locale | grep LANG | sed 's/LANG=//' | cut -c1-5`
#KDE #{{{
if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
elif [[ $LOCALE == en_US ]]; then
LOCALE_KDE="en_gb"
else
LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#FIREFOX #{{{
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
LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
else
LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#THUNDERBIRD #{{{
if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
elif [[ $LOCALE == es_CL ]]; then
LOCALE_TB="es-es"
else
LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#HUNSPELL #{{{
if [[ $LOCALE == pt_BR ]]; then
LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
elif [[ $LOCALE == pt_PT ]]; then
LOCALE_HS="pt_pt"
else
LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#ASPELL #{{{
LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
#}}}
#LIBREOFFICE #{{{
if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
else
LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#}}}
print_title "LOCALE - https://wiki.archlinux.org/index.php/Locale"
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."
read -p "Default system language: \"$LOCALE\" [Y/n]: " OPTION
case "$OPTION" in
"n")
while [[ $OPTION != y ]]; do
setlocale
read_input_text "Confirm locale ($LOCALE)"
done
sed -i '/'${LOCALE}'/s/^#//' /etc/locale.gen
locale-gen
localectl set-locale LANG=${LOCALE_UTF8}
#KDE #{{{
if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == zh_CN ]]; then
LOCALE_KDE=`echo $LOCALE | tr '[:upper:]' '[:lower:]'`
elif [[ $LOCALE == en_US ]]; then
LOCALE_KDE="en_gb"
else
LOCALE_KDE=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#FIREFOX #{{{
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
LOCALE_FF=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
else
LOCALE_FF=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#THUNDERBIRD #{{{
if [[ $LOCALE == pt_BR || $LOCALE == pt_PT || $LOCALE == en_US || $LOCALE == en_GB || $LOCALE == es_AR || $LOCALE == es_ES || $LOCALE == zh_CN ]]; then
LOCALE_TB=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
elif [[ $LOCALE == es_CL ]]; then
LOCALE_TB="es-es"
else
LOCALE_TB=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#HUNSPELL #{{{
if [[ $LOCALE == pt_BR ]]; then
LOCALE_HS=`echo $LOCALE | tr '[:upper:]' '[:lower:]' | sed 's/_/-/'`
elif [[ $LOCALE == pt_PT ]]; then
LOCALE_HS="pt_pt"
else
LOCALE_HS=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
#ASPELL #{{{
LOCALE_AS=`echo $LOCALE | cut -d\_ -f1`
#}}}
#LIBREOFFICE #{{{
if [[ $LOCALE == pt_BR || $LOCALE == en_GB || $LOCALE == en_US || $LOCALE == zh_CN ]]; then
LOCALE_LO=`echo $LOCALE | sed 's/_/-/'`
else
LOCALE_LO=`echo $LOCALE | cut -d\_ -f1`
fi
#}}}
;;
*)
;;
esac
}
#}}}
#SELECT/CREATE USER {{{
select_user(){
#CREATE NEW USER {{{
create_new_user(){
read -p "Username: " USER_NAME
useradd -m -g users -G wheel -s /bin/bash ${USER_NAME}
chfn ${USER_NAME}
passwd ${USER_NAME}
pause_function
configure_user_account
}
#}}}
#CONFIGURE USER ACCOUNT {{{
configure_user_account(){
#BASHRC {{{
print_title "BASHRC - https://wiki.archlinux.org/index.php/Bashrc"
bashrc_list=("Default" "Vanilla" "Get from github");
PS3="$prompt1"
echo -e "Choose your .bashrc\n"
select OPT in "${bashrc_list[@]}"; do
case "$REPLY" in
1)
package_install "git"
git clone https://github.com/helmuthdu/dotfiles
cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc ~/
cp dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 dotfiles/.nanorc /home/${USER_NAME}/
rm -fr dotfiles
;;
2)
cp /etc/skel/.bashrc /home/${USER_NAME}
;;
3)
package_install "git"
read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
read -p "Enter your github repository [ex: aui]: " GITHUB_REPO
git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
cp -R $GITHUB_REPO/.* /home/${USER_NAME}/
rm -fr $GITHUB_REPO
;;
*)
invalid_option
;;
esac
[[ -n $OPT ]] && break
done
#}}}
#EDITOR {{{
print_title "DEFAULT EDITOR"
editors_list=("emacs" "joe" "nano" "vi" "vim" "zile");
PS3="$prompt1"
echo -e "Select editor\n"
select EDITOR in "${editors_list[@]}"; do
if contains_element "$EDITOR" "${editors_list[@]}"; then
if [[ $EDITOR == joe ]]; then
! is_package_installed "joe" && aui_download_packages "joe"
elif [[ $EDITOR == vim ]]; then
! is_package_installed "gvim" && package_install "vim ctags"
#VIMRC {{{
if [[ ! -f /home/${USER_NAME}/.vimrc ]]; then
vimrc_list=("Default" "Vanilla" "Get from github");
PS3="$prompt1"
echo -e "Choose your .vimrc\n"
select OPT in "${vimrc_list[@]}"; do
case "$REPLY" in
1)
package_install "git"
git clone https://github.com/helmuthdu/vim
mv vim /home/${USER_NAME}/.vim
ln -sf /home/${USER_NAME}/.vim/vimrc /home/${USER_NAME}/.vimrc
cp -R vim /home/${USER_NAME}/.vim/fonts /home/${USER_NAME}/.fonts
;;
3)
package_install "git"
read -p "Enter your github username [ex: helmuthdu]: " GITHUB_USER
read -p "Enter your github repository [ex: vim]: " GITHUB_REPO
git clone https://github.com/$GITHUB_USER/$GITHUB_REPO
cp -R $GITHUB_REPO/.vim /home/${USER_NAME}/
if [[ -f $GITHUB_REPO/vimrc ]]; then
ln -sf /home/${USER_NAME}/.vim/vimrc /home/${USER_NAME}/.vimrc
else
ln -sf /home/${USER_NAME}/.vim/.vimrc /home/${USER_NAME}/.vimrc
fi
rm -fr $GITHUB_REPO
;;
2)
echo "Nothing to do..."
;;
*)
invalid_option
;;
esac
[[ -n $OPT ]] && break
done
fi
#}}}
else
package_install "$EDITOR"
fi
break
else
invalid_option
fi
done
#}}}
chown -R ${USER_NAME}:users /home/${USER_NAME}
}
#}}}
print_title "SELECT/CREATE USER ACCOUNT - https://wiki.archlinux.org/index.php/Users_and_Groups"
users_list=(`cat /etc/passwd | grep "/home" | cut -d: -f1`);
PS3="$prompt1"
echo "Avaliable Users:"
if [[ $(( ${#users_list[@]} )) -gt 0 ]]; then
print_warning "WARNING: THE SELECTED USER MUST HAVE SUDO PRIVILEGES"
else
echo ""
fi
select OPT in "${users_list[@]}" "Create new user"; do
if [[ $OPT == "Create new user" ]]; then
create_new_user
elif contains_element "$OPT" "${users_list[@]}"; then
USER_NAME=$OPT
else
invalid_option
fi
[[ -n $OPT ]] && break
done
[[ ! -f /home/${USER_NAME}/.bashrc ]] && configure_user_account;
}
#}}}
#CONFIGURE SUDO {{{
configure_sudo(){
if ! is_package_installed "sudo" ; then
print_title "SUDO - https://wiki.archlinux.org/index.php/Sudo"
package_install "sudo"
fi
#CONFIGURE SUDOERS {{{
if [[ ! -f /etc/sudoers.aui ]]; then
cp -v /etc/sudoers /etc/sudoers.aui
## Uncomment to allow members of group wheel to execute any command
sed -i '/%wheel ALL=(ALL) ALL/s/^#//' /etc/sudoers
## Same thing without a password (not secure)
#sed -i '/%wheel ALL=(ALL) NOPASSWD: ALL/s/^#//' /etc/sudoers
#This config is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:
echo "" >> /etc/sudoers
echo 'Defaults !requiretty, !tty_tickets, !umask' >> /etc/sudoers
echo 'Defaults visiblepw, path_info, insults, lecture=always' >> /etc/sudoers
echo 'Defaults loglinelen=0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth' >> /etc/sudoers
echo 'Defaults passwd_tries=3, passwd_timeout=1' >> /etc/sudoers
echo 'Defaults env_reset, always_set_home, set_home, set_logname' >> /etc/sudoers
echo 'Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"' >> /etc/sudoers
echo 'Defaults timestamp_timeout=300' >> /etc/sudoers
echo 'Defaults passprompt="[sudo] password for %u: "' >> /etc/sudoers
fi
#}}}
}
#}}}
#AUR HELPER {{{
choose_aurhelper(){
print_title "AUR HELPER - https://wiki.archlinux.org/index.php/AUR_Helpers"
print_info "AUR Helpers are written to make using the Arch User Repository more comfortable."
print_warning "\tNone of these tools are officially supported by Arch devs."
aurhelper=("Yaourt" "Packer" "Pacaur")
PS3="$prompt1"
echo -e "Choose your default AUR helper to install\n"
select OPT in "${aurhelper[@]}"; do
case "$REPLY" in
1)
print_title "YAOURT - https://wiki.archlinux.org/index.php/Yaourt"
print_info "Yaourt (Yet AnOther User Repository Tool) is a community-contributed wrapper for pacman which adds seamless access to the AUR, allowing and automating package compilation and installation from your choice of the thousands of PKGBUILDs in the AUR, in addition to the many thousands of available Arch Linux binary packages."
if ! is_package_installed "yaourt" ; then
package_install "base-devel yajl namcap"
pacman -D --asdeps yajl namcap
aui_download_packages "package-query yaourt"
pacman -D --asdeps package-query
if ! is_package_installed "yaourt" ; then
echo "Yaourt not installed. EXIT now"
pause_function
exit 0
fi
fi
AUR_PKG_MANAGER="yaourt"
;;
2)
if ! is_package_installed "packer" ; then
package_install "base-devel git jshon"
pacman -D --asdeps jshon
aui_download_packages "packer"
if ! is_package_installed "packer" ; then
echo "Packer not installed. EXIT now"
pause_function
exit 0
fi
fi
AUR_PKG_MANAGER="packer"
;;
3)
if ! is_package_installed "pacaur" ; then
package_install "base-devel yajl expac"
pacman -D --asdeps yajl expac
#fix pod2man path
ln -s /usr/bin/core_perl/pod2man /usr/bin/
aui_download_packages "cower pacaur"
pacman -D --asdeps cower
if ! is_package_installed "pacaur" ; then
echo "Pacaur not installed. EXIT now"
pause_function
exit 0
fi
fi
AUR_PKG_MANAGER="pacaur"
;;
*)
invalid_option
;;
esac
[[ -n $OPT ]] && break
done
pause_function
}
#}}}
#POWERPILL {{{
install_powerpill (){
print_title "POWERPILL - https://wiki.archlinux.org/index.php/Powerpill"
print_info "Powerpill is a Pacman wrapper that uses parallel and segmented downloading to try to speed up downloads for Pacman."
read_input_text "Install Powerpill"
if [[ $OPTION == y ]]; then
aur_package_install "powerpill"
fi
is_package_installed "powerpill" && PKG_MANAGER="powerpill"
}
#}}}
#AUTOMATIC MODE {{{
automatic_mode(){
print_title "AUTOMATIC MODE"
print_info "Create a custom install with all options pre-selected.\nUse this option with care."
print_warning "\tUse this mode only if you already know all the option.\n\tYou won't be able to select anything later."
read_input_text "Enable Automatic Mode"
if [[ $OPTION == y ]]; then
$EDITOR ${AUI_DIR}/aui_automode
source ${AUI_DIR}/aui_automode
echo -e "The installation will start now."
pause_function
AUTOMATIC_MODE=1
fi
}
#}}}
#CUSTOM REPOSITORIES {{{
add_custom_repositories(){
# ENABLE MULTILIB REPOSITORY {{{
# this option will avoid any problem with packages install
if [[ $ARCHI == x86_64 ]]; then
local MULTILIB=`grep -n "\[multilib\]" /etc/pacman.conf | cut -f1 -d:`
if [[ -z $MULTILIB ]]; then
echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
echo -e '\nMultilib repository added into pacman.conf file'
else
sed -i "${MULTILIB}s/^#//" /etc/pacman.conf
local MULTILIB=$(( $MULTILIB + 1 ))
sed -i "${MULTILIB}s/^#//" /etc/pacman.conf
fi
fi
#}}}
print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
read_input_text "Add custom repositories" $CUSTOMREPO
if [[ $OPTION == y ]]; then
while true
do
print_title "CUSTOM REPOSITORIES - https://wiki.archlinux.org/index.php/Unofficial_User_Repositories"
echo " 1) \"Add new repository\""
echo ""
echo " d) DONE"
echo ""
read -p "$prompt1" OPTION
case $OPTION in
1)
read -p "Repository Name [ex: custom]: " REPONAME
read -p "Repository Address [ex: file:///media/backup/Archlinux]: " REPOADDRESS
echo -e '\n['"$REPONAME"']\nServer = '"$REPOADDRESS"/'$arch' >> /etc/pacman.conf
echo -e '\nCustom repository added into pacman.conf file'
pause_function
;;
"d")
break
;;
*)
invalid_option
;;
esac
done
fi
system_update
}
#}}}
#BASIC SETUP {{{
install_basic_setup(){
print_title "BASH TOOLS - https://wiki.archlinux.org/index.php/Bash"
package_install "bc rsync mlocate bash-completion pkgstats"
print_title "NTPd - https://wiki.archlinux.org/index.php/NTPd"
package_install "ntp"
is_package_installed "ntp" && timedatectl set-ntp true
pause_function
print_title "(UN)COMPRESS TOOLS - https://wiki.archlinux.org/index.php/P7zip"
package_install "zip unzip unrar p7zip"
pause_function
print_title "AVAHI - https://wiki.archlinux.org/index.php/Avahi"
print_info "Avahi is a free Zero Configuration Networking (Zeroconf) implementation, including a system for multicast DNS/DNS-SD discovery. It allows programs to publish and discovers and hosts running on a local network with no specific configuration."
package_install "avahi nss-mdns"
is_package_installed "avahi" && system_ctl enable avahi-daemon
is_package_installed "avahi" && system_ctl enable avahi-dnsconfd
pause_function
print_title "ALSA - https://wiki.archlinux.org/index.php/Alsa"
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."
package_install "alsa-utils alsa-plugins"
[[ ${ARCHI} == x86_64 ]] && package_install "lib32-alsa-plugins"
pause_function
print_title "PULSEAUDIO - https://wiki.archlinux.org/index.php/Pulseaudio"
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"
package_install "pulseaudio pulseaudio-alsa"
[[ ${ARCHI} == x86_64 ]] && package_install "lib32-libpulse"
# automatically switch to newly-connected devices
add_line "load-module module-switch-on-connect" "/etc/pulse/default.pa"
pause_function
print_title "NTFS/FAT/exFAT - https://wiki.archlinux.org/index.php/File_Systems"
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."
package_install "ntfs-3g dosfstools exfat-utils fuse fuse-exfat"
is_package_installed "fuse" && add_module "fuse"
pause_function
}
#}}}
#SSH {{{
install_ssh(){
print_title "SSH - https://wiki.archlinux.org/index.php/Ssh"
print_info "Secure Shell (SSH) is a network protocol that allows data to be exchanged over a secure channel between two computers."
read_input_text "Install ssh" $SSH
if [[ $OPTION == y ]]; then
package_install "openssh"
aur_package_install "rssh"
system_ctl enable sshd
[[ ! -f /etc/ssh/sshd_config.aui ]] && cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config.aui;
#CONFIGURE SSHD_CONF #{{{
sed -i '/Port 22/s/^#//' /etc/ssh/sshd_config
sed -i '/Protocol 2/s/^#//' /etc/ssh/sshd_config
sed -i '/HostKey \/etc\/ssh\/ssh_host_rsa_key/s/^#//' /etc/ssh/sshd_config
sed -i '/HostKey \/etc\/ssh\/ssh_host_dsa_key/s/^#//' /etc/ssh/sshd_config
sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/s/^#//' /etc/ssh/sshd_config
sed -i '/KeyRegenerationInterval/s/^#//' /etc/ssh/sshd_config
sed -i '/ServerKeyBits/s/^#//' /etc/ssh/sshd_config
sed -i '/SyslogFacility/s/^#//' /etc/ssh/sshd_config
sed -i '/LogLevel/s/^#//' /etc/ssh/sshd_config
sed -i '/LoginGraceTime/s/^#//' /etc/ssh/sshd_config
sed -i '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
sed -i '/HostbasedAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i '/StrictModes/s/^#//' /etc/ssh/sshd_config
sed -i '/RSAAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i '/IgnoreRhosts/s/^#//' /etc/ssh/sshd_config
sed -i '/PermitEmptyPasswords/s/^#//' /etc/ssh/sshd_config
sed -i '/AllowTcpForwarding/s/^#//' /etc/ssh/sshd_config
sed -i '/AllowTcpForwarding no/d' /etc/ssh/sshd_config
sed -i '/X11Forwarding/s/^#//' /etc/ssh/sshd_config
sed -i '/X11Forwarding/s/no/yes/' /etc/ssh/sshd_config
sed -i -e '/\tX11Forwarding yes/d' /etc/ssh/sshd_config
sed -i '/X11DisplayOffset/s/^#//' /etc/ssh/sshd_config
sed -i '/X11UseLocalhost/s/^#//' /etc/ssh/sshd_config
sed -i '/PrintMotd/s/^#//' /etc/ssh/sshd_config
sed -i '/PrintMotd/s/yes/no/' /etc/ssh/sshd_config
sed -i '/PrintLastLog/s/^#//' /etc/ssh/sshd_config
sed -i '/TCPKeepAlive/s/^#//' /etc/ssh/sshd_config
sed -i '/the setting of/s/^/#/' /etc/ssh/sshd_config
sed -i '/RhostsRSAAuthentication and HostbasedAuthentication/s/^/#/' /etc/ssh/sshd_config
#}}}
pause_function
fi
}
#}}}
#NFS {{{
install_nfs(){
print_title "NFS - https://wiki.archlinux.org/index.php/Nfs"
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."
read_input_text "Install nfs" $NFS
if [[ $OPTION == y ]]; then
package_install "nfs-utils"
system_ctl enable rpc-idmapd
system_ctl enable rpc-mountd
pause_function
fi
}
#}}}
#SAMBA {{{
install_samba(){
print_title "SAMBA - https://wiki.archlinux.org/index.php/Samba"
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."
read_input_text "Install Samba" $SAMBA
if [[ $OPTION == y ]]; then
package_install "samba smbnetfs"
[[ ! -f /etc/samba/smb.conf ]] && cp /etc/samba/smb.conf.default /etc/samba/smb.conf
local CONFIG_SAMBA=`cat /etc/samba/smb.conf | grep usershare`
if [[ -z $CONFIG_SAMBA ]]; then
# configure usershare
export USERSHARES_DIR="/var/lib/samba/usershares"
export USERSHARES_GROUP="sambashare"
mkdir -p ${USERSHARES_DIR}
groupadd ${USERSHARES_GROUP}
chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
chmod 01770 ${USERSHARES_DIR}
sed -i -e '/\[global\]/a\\n usershare path = /var/lib/samba/usershares\n usershare max shares = 100\n usershare allow guests = yes\n usershare owner only = False' /etc/samba/smb.conf
usermod -a -G ${USERSHARES_GROUP} ${USER_NAME}
sed -i '/user_allow_other/s/^#//' /etc/fuse.conf
modprobe fuse
fi
# enable services
system_ctl enable smbd
system_ctl enable nmbd
# automatic mounting
system_ctl enable smbnetfs
pause_function
fi
}
#}}}
#READAHEAD {{{
enable_readahead(){
print_title "Readahead - https://wiki.archlinux.org/index.php/Improve_Boot_Performance"
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)."
read_input_text "Enable Readahead" $READAHEAD
if [[ $OPTION == y ]]; then
system_ctl enable systemd-readahead-collect
system_ctl enable systemd-readahead-replay
pause_function
fi
}
#}}}
#ZRAM {{{
install_zram (){
print_title "ZRAM - https://wiki.archlinux.org/index.php/Maximizing_Performance"
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)."
read_input_text "Install Zram" $ZRAM
if [[ $OPTION == y ]]; then
aur_package_install "zramswap"
system_ctl enable zramswap
pause_function
fi
}
#}}}
#TLP {{{
install_tlp(){
print_title "TLP - https://wiki.archlinux.org/index.php/Tlp"
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."
read_input_text "Install TLP " $TLP
if [[ $OPTION == y ]]; then
aur_package_install "tlp"
tlp start
system_ctl enable tlp
pause_function
fi
}
#}}}
#XORG {{{
install_xorg(){
print_title "XORG - https://wiki.archlinux.org/index.php/Xorg"
print_info "Xorg is the public, open-source implementation of the X window system version 11."
echo "Installing X-Server (req. for Desktopenvironment, GPU Drivers, Keyboardlayout,...)"
package_install "xorg-server xorg-server-utils xorg-xinit"
package_install "xf86-input-synaptics xf86-input-mouse xf86-input-keyboard"
package_install "mesa"
package_install "gamin"
KEYMAP=$(localectl status | grep Keymap | awk '{print $3}')
localectl set-keymap ${KEYMAP}
pause_function
}
#}}}
#FONT CONFIGURATION {{{
font_config(){
while true
do
print_title "FONTS CONFIGURATION - https://wiki.archlinux.org/index.php/Font_Configuration"
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."
echo " 1) Default"
echo " 2) Infinality"
echo " 3) Ubuntu"
echo ""
read_input $FONTCONFIG
case "$OPTION" in
1)
is_package_installed "freetype2-infinality" && pacman -Rdds freetype2-infinality fontconfig-infinality
is_package_installed "freetype2-ubuntu" && pacman -Rdds freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu
pacman -S --asdeps --needed cairo fontconfig freetype2 libxft
#enable global fonts configs
cd /etc/fonts/conf.d
[[ ! -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf ]] && ln -sv ../conf.avail/10-sub-pixel-rgb.conf
[[ ! -f /etc/fonts/conf.d/10-autohint.conf ]] && ln -sv ../conf.avail/10-autohint.conf
[[ ! -f /etc/fonts/conf.d/11-lcdfilter-default.conf ]] && ln -sv ../conf.avail/11-lcdfilter-default.conf
[[ ! -f /etc/fonts/conf.d/70-no-bitmaps.conf ]] && ln -s ../conf.avail/70-no-bitmaps.conf
cd $AUI_DIR
break
;;
2)
is_package_installed "freetype2" && pacman -Rdds --noconfirm freetype2
aur_package_install "freetype2-infinality fontconfig-infinality"
/etc/profile.d/infinality-settings.sh
infctl setstyle
break
;;
3)
is_package_installed "freetype2" && pacman -Rdds --noconfirm freetype2 fontconfig cairo libxft
aur_package_install "freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu"
break
;;
*)
invalid_option
;;
esac
done
pause_function
}
#}}}
#VIDEO CARDS {{{
install_video_cards(){
package_install "dmidecode"
print_title "VIDEO CARD"
check_vga
#Virtualbox {{{
if [[ ${VIDEO_DRIVER} == virtualbox ]]; then
package_install "virtualbox-guest-utils"
add_module "vboxguest vboxsf vboxvideo" "virtualbox-guest"
add_user_to_group ${USER_NAME} vboxsf
system_ctl disable ntpd
system_ctl enable vbo
VBoxClient-all
#}}}
#NVIDIA {{{
elif [[ ${VIDEO_DRIVER} == nvidia ]]; then
XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
[[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
is_package_installed "nouveau-dri" && pacman -Rdds --noconfirm nouveau-dri
pacman -S --needed nvidia{,-utils}
package_install "pangox-compat" #fix nvidia-settings
package_install "libva-vdpau-driver"
if [[ ${ARCHI} == x86_64 ]]; then
is_package_installed "lib32-nouveau-dri" && pacman -Rdds --noconfirm lib32-nouveau-dri
pacman -S --needed "lib32-nvidia-utils"
fi
replace_line '*options nouveau modeset=1' '#options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
replace_line '*MODULES="nouveau"' '#MODULES="nouveau"' /etc/mkinitcpio.conf
mkinitcpio -p linux
nvidia-xconfig --add-argb-glx-visuals --allow-glx-with-composite --composite -no-logo --render-accel -o /etc/X11/xorg.conf.d/20-nvidia.conf;
#}}}
#Nouveau [NVIDIA] {{{
elif [[ ${VIDEO_DRIVER} == nouveau ]]; then
is_package_installed "nvidia" && pacman -Rdds --noconfirm nvidia{,-utils}
[[ -f /etc/X11/xorg.conf.d/20-nvidia.conf ]] && rm /etc/X11/xorg.conf.d/20-nvidia.conf
pacman -S --asdeps mesa-libgl
package_install "xf86-video-${VIDEO_DRIVER} ${VIDEO_DRIVER}-dri"
if [[ ${ARCHI} == x86_64 ]]; then
is_package_installed "lib32-nvidia-utils" && pacman -Rdds --noconfirm lib32-nvidia-utils
pacman -S --needed "lib32-${VIDEO_DRIVER}-dri"
fi
replace_line '#*options nouveau modeset=1' 'options nouveau modeset=1' /etc/modprobe.d/modprobe.conf
replace_line '#*MODULES="nouveau"' 'MODULES="nouveau"' /etc/mkinitcpio.conf
mkinitcpio -p linux
#}}}
#Catalyst [ATI] {{{
elif [[ ${VIDEO_DRIVER} == catalyst ]]; then
XF86_DRIVERS=$(pacman -Qe | grep xf86-video | awk '{print $1}')
[[ -n $XF86_DRIVERS ]] && pacman -Rcsn $XF86_DRIVERS
is_package_installed "ati-dri" && pacman package_remove "ati-dri"
[[ -f /etc/modules-load.d/ati.conf ]] && rm /etc/modules-load.d/ati.conf
package_install "linux-headers"
# Add repository
pacman-key --keyserver pgp.mit.edu --recv-keys 0xabed422d653c3094
pacman-key --lsign-key 0xabed422d653c3094
add_repository "catalyst" "http://catalyst.wirephire.com/repo/catalyst/\$arch"
pacman -S --needed catalyst catalyst-utils
if [[ ${ARCHI} == x86_64 ]]; then
is_package_installed "lib32-ati-dri" && pacman -Rdds --noconfirm lib32-ati-dri
pacman -S --needed "lib32-catalyst-utils"
fi
package_install "catalyst-hook"
system_ctl enable catalyst-hook
aticonfig --initial --output=/etc/X11/xorg.conf.d/20-radeon.conf
add_module "fglrx" "ati"
#}}}
#ATI {{{
elif [[ ${VIDEO_DRIVER} == ati ]]; then
is_package_installed "catalyst-dkms" && pacman -Rdds --noconfirm catalyst{-dkms,-utils} lib32-catalyst-utils
pacman -S --asdeps mesa-libgl
[[ -f /etc/X11/xorg.conf.d/20-radeon.conf ]] && rm /etc/X11/xorg.conf.d/20-radeon.conf
[[ -f /etc/modules-load.d/ati.conf ]] && rm /etc/modules-load.d/ati.conf
package_install "xf86-video-${VIDEO_DRIVER} ${VIDEO_DRIVER}-dri"
if [[ ${ARCHI} == x86_64 ]]; then
is_package_installed "lib32-catalyst-utils" && pacman -Rdds --noconfirm lib32-catalyst-utils
package_install "lib32-${VIDEO_DRIVER}-dri"
fi
add_module "radeon" "ati"
#}}}
#Intel {{{
elif [[ ${VIDEO_DRIVER} == intel ]]; then
package_install "xf86-video-intel intel-dri libva-intel-driver"
[[ ${ARCHI} == x86_64 ]] && package_install "lib32-mesa-libgl"
#}}}
#Vesa {{{
else
package_install "xf86-video-${VIDEO_DRIVER}"
[[ ${ARCHI} == x86_64 ]] && package_install "lib32-mesa-libgl"
fi
#}}}
pause_function
}
#}}}
#CUPS {{{
install_cups(){
print_title "CUPS - https://wiki.archlinux.org/index.php/Cups"
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."
read_input_text "Install CUPS (aka Common Unix Printing System)" $CUPS
if [[ $OPTION == y ]]; then
package_install "cups cups-filters ghostscript gsfonts"
package_install "gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters hplip splix cups-pdf"
system_ctl enable cups
pause_function
fi
}
#}}}
#ADDITIONAL FIRMWARE {{{
install_additional_firmwares(){
print_title "INSTALL ADDITIONAL FIRMWARES"
read_input_text "Install additional firmwares [Audio,Bluetooth,Scanner,Wireless]" $FIRMWARE
if [[ $OPTION == y ]]; then
while true
do
print_title "INSTALL ADDITIONAL FIRMWARES"
echo " 1) $(menu_item "alsa-firmware")"
echo " 2) $(menu_item "ipw2100-fw")"
echo " 3) $(menu_item "ipw2200-fw")"
echo " 4) $(menu_item "b43-firmware") $AUR"
echo " 5) $(menu_item "b43-firmware-legacy") $AUR"
echo " 6) $(menu_item "broadcom-wl") $AUR"
echo " 7) $(menu_item "bluez-firmware") [Broadcom BCM203x/STLC2300 Bluetooth]"
echo " 8) $(menu_item "libmtp") [Android Devices]"
echo " 9) $(menu_item "libffado") [Fireware Audio Devices]"
echo "10) $(menu_item "libraw1394") [IEEE1394 Driver]"
echo "11) $(menu_item "aic94xx-firmware") $AUR"
echo "12) $(menu_item "bfa-firmware") $AUR"
echo ""
echo " d) DONE"
echo ""
FIRMWARE_OPTIONS+=" d"
read_input_options "$FIRMWARE_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "alsa-firmware"
;;
2)
package_install "ipw2100-fw"
;;
3)
package_install "ipw2200-fw"
;;
4)
aur_package_install "b43-firmware"
;;
5)
aur_package_install "b43-firmware-legacy"
;;
6)
aur_package_install "broadcom-wl"
;;
7)
package_install "bluez-firmware"
;;
8)
package_install "libmtp"
aur_package_install "android-udev"
;;
9)
package_install "libffado"
;;
10)
package_install "libraw1394"
;;
11)
aur_package_install "aic94xx-firmware"
;;
12)
aur_package_install "bfa-firmware"
;;
"d")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
fi
}
#}}}
#GIT ACCESS THRU A FIREWALL {{{
install_git_tor(){
print_title "GIT-TOR - https://wiki.archlinux.org/index.php/Tor"
print_info "Tor is an open source implementation of 2nd generation onion routing that provides free access to an anonymous proxy network. Its primary goal is to enable online anonymity by protecting against traffic analysis attacks."
read_input_text "Ensuring access to GIT through a firewall (bypass college/work firewall)" $GITTOR
if [[ $OPTION == y ]]; then
package_install "openbsd-netcat vidalia privoxy git"
if [[ ! -f /usr/bin/proxy-wrapper ]]; then
echo 'forward-socks5 / 127.0.0.1:9050 .' >> /etc/privoxy/config
echo -e '#!/bin/bash\nnc -xlocalhost:9050 -X5 $*' > /usr/bin/proxy-wrapper
chmod +x /usr/bin/proxy-wrapper
echo -e '\nexport GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"' >> /etc/bash.bashrc
export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"
su - ${USER_NAME} -c 'export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"'
fi
groupadd -g 42 privoxy
useradd -u 42 -g privoxy -s /bin/false -d /etc/privoxy privoxy
system_ctl start tor
system_ctl start privoxy
system_ctl enable tor
system_ctl enable privoxy
pause_function
fi
}
#}}}
#DESKTOP ENVIRONMENT {{{
install_desktop_environment(){
install_icon_theme() { #{{{
package_install "gtk-update-icon-cache"
while true
do
print_title "GNOME ICONS"
echo " 1) $(menu_item "awoken-icons" "Awoken")"
echo " 2) $(menu_item "elementary-xfce-icons" "Elementary XFCE")"
echo " 3) $(menu_item "faenza-icon-theme")"
echo " 4) $(menu_item "faenza-cupertino-icon-theme" "Faenza-Cupertino")"
echo " 5) $(menu_item "faience-icon-theme")"
echo " 6) $(menu_item "inx-icon-theme" "iNX")"
echo " 7) $(menu_item "matrilineare-icon-theme")"
echo " 8) $(menu_item "moka-icon-theme-git")"
echo " 9) $(menu_item "nitrux-icon-theme")"
echo ""
echo " b) BACK"
echo ""
ICONS_THEMES+=" b"
read_input_options "$ICONS_THEMES"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "awoken-icons"
;;
2)
aur_package_install "elementary-xfce-icons"
;;
3)
package_install "faenza-icon-theme"
;;
4)
aur_package_install "faenza-cupertino-icon-theme"
;;
5)
package_install "faience-icon-theme"
;;
6)
aur_package_install "inx-icon-theme"
;;
7)
aur_package_install "matrilineare-icon-theme"
;;
8)
aur_package_install "moka-icon-theme-git"
;;
9)
aur_package_install "nitrux-icon-theme"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
} #}}}
install_gtk_theme() { #{{{
while true
do
print_title "GTK2/GTK3 THEMES"
echo " 1) $(menu_item "xfce-theme-greybird-git" "Greybird")"
echo " 2) $(menu_item "gtk-theme-numix-git" "Numix")"
echo " 3) $(menu_item "gtk-theme-orion-git" "Orion")"
echo ""
echo " b) BACK"
echo ""
GTK_THEMES+=" b"
read_input_options "$GTK_THEMES"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "xfce-theme-greybird-git"
;;
2)
aur_package_install "gtk-theme-numix-git"
;;
3)
aur_package_install "gtk-theme-orion-git"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
} #}}}
install_display_manager() { #{{{
while true
do
print_title "DISPLAY MANAGER - https://wiki.archlinux.org/index.php/Display_Manager"
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."
echo " 1) $(menu_item "entrance-git" "Entrance") $AUR"
echo " 2) $(menu_item "gdm" "GDM")"
echo " 3) $(menu_item "lightdm" "LightDM") $AUR"
echo " 4) $(menu_item "lxdm" "LXDM")"
echo " 5) $(menu_item "slim")"
echo ""
echo " b) BACK|SKIP"
echo ""
DISPLAY_MANAGER+=" b"
read_input_options "$DISPLAY_MANAGER"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "entrance-git"
system_ctl enable entrance
;;
2)
package_install "gdm"
system_ctl enable gdm
;;
3)
if [[ ${KDE} -eq 1 ]]; then
package_install "lightdm lightdm-kde-greeter"
else
package_install "lightdm lightdm-gtk3-greeter"
fi
system_ctl enable lightdm
;;
4)
package_install "lxdm"
system_ctl enable lxdm
;;
5)
package_install "slim"
system_ctl enable slim
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
} #}}}
install_themes() { #{{{
while true
do
print_title "$1 THEMES"
echo " 1) $(menu_item "awoken-icons faenza-icon-theme faenza-cupertino-icon-theme faience-icon-theme elementary-xfce-icons inx-icon-theme matrilineare-icon-theme nitrux-icon-theme" "Icons Themes") $AUR"
echo " 2) $(menu_item "xfce-theme-greybird faience-themes gtk-theme-gnome-cupertino mediterraneannight-theme light-themes zukitwo-themes" "GTK Themes") $AUR"
[[ $GNOME -eq 1 ]] && echo " 3) $(menu_item "gnome-shell-theme-default-mod" "Gnome Shell Themes") $AUR"
[[ $CINNAMON -eq 1 ]] && echo " 3) $(menu_item "cinnamon-theme-ambience cinnamon-theme-baldr cinnamon-theme-google+ cinnamon-theme-eleganse cinnamon-theme-helios cinnamon-theme-elementary-luna cinnamon-theme-holo cinnamon-theme-gnome cinnamon-theme-loki" "Cinnamon themes") $AUR"
echo ""
echo " d) DONE"
echo ""
THEMES_OPTIONS+=" d"
read_input_options "$THEMES_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
install_icon_theme
OPT=1
;;
2)
install_gtk_theme
OPT=2
;;
3)
if [[ $GNOME -eq 1 ]]; then
#GNOME SHELL THEMES {{{
while true
do
print_title "GNOME SHELL THEMES"
echo " 1) $(menu_item "gnome-shell-theme-default-mod")"
echo ""
echo " b) BACK"
echo ""
GNOME_SHELL_THEMES+=" b"
read_input_options "$GNOME_SHELL_THEMES"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "gnome-shell-theme-default-mod"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
elif [[ $CINNAMON -eq 1 ]]; then
#CINNAMON THEMES {{{
while true
do
print_title "CINNAMON THEMES"
echo " 1) $(menu_item "cinnamon-theme-ambience")"
echo " 2) $(menu_item "cinnamon-theme-baldr")"
echo " 3) $(menu_item "cinnamon-theme-eleganse")"
echo " 4) $(menu_item "cinnamon-theme-elementary-luna")"
echo " 5) $(menu_item "cinnamon-theme-gnome")"
echo " 6) $(menu_item "cinnamon-theme-faience")"
echo " 7) $(menu_item "cinnamon-theme-google+")"
echo " 8) $(menu_item "cinnamon-theme-helios")"
echo " 9) $(menu_item "cinnamon-theme-holo")"
echo "10) $(menu_item "cinnamon-theme-nadia")"
echo "11) $(menu_item "cinnamon-theme-loki")"
echo ""
echo " b) BACK"
echo ""
CINNAMON_THEMES+=" b"
read_input_options "$CINNAMON_THEMES"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "cinnamon-theme-ambience"
;;
2)
aur_package_install "cinnamon-theme-baldr"
;;
3)
aur_package_install "cinnamon-theme-eleganse"
;;
4)
aur_package_install "cinnamon-theme-elementary-luna"
;;
5)
aur_package_install "cinnamon-theme-gnome"
;;
6)
aur_package_install "cinnamon-theme-faience"
;;
7)
aur_package_install "cinnamon-theme-google+"
;;
8)
aur_package_install "cinnamon-theme-helios"
;;
9)
aur_package_install "cinnamon-theme-holo"
;;
10)
aur_package_install "cinnamon-theme-nadia"
;;
11)
aur_package_install "cinnamon-theme-loki"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
else
invalid_option
fi
OPT=3
;;
"d")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
} #}}}
install_misc_apps() { #{{{
while true
do
print_title "$1 ESSENTIAL APPS"
echo " 1) $(menu_item "entrance-git gdm lightdm lxdm slim" "Display Manager") $AUR"
echo " 2) $(menu_item "dmenu")"
echo " 3) $(menu_item "viewnior")"
echo " 4) $(menu_item "gmrun")"
echo " 5) $(menu_item "pcmanfm" "PCManFM")"
echo " 6) $(menu_item "rxvt-unicode")"
echo " 7) $(menu_item "scrot")"
echo " 8) $(menu_item "squeeze-git") $AUR"
echo " 9) $(menu_item "thunar")"
echo "10) $(menu_item "tint2")"
echo "11) $(menu_item "volwheel")"
echo "12) $(menu_item "xfburn")"
echo "13) $(menu_item "xcompmgr")"
echo "14) $(menu_item "zathura")"
echo ""
echo " d) DONE"
echo ""
MISCAPPS+=" d"
read_input_options "$MISCAPPS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
install_display_manager
OPT=1
;;
2)
package_install "dmenu"
;;
3)
package_install "viewnior"
;;
4)
package_install "gmrun"
;;
5)
package_install "pcmanfm gvfs"
;;
6)
package_install "rxvt-unicode"
;;
7)
package_install "scrot"
;;
8)
aur_package_install "squeeze-git"
;;
9)
package_install "thunar tumbler"
;;
10)
package_install "tint2"
;;
11)
package_install "volwheel"
;;
12)
package_install "xfburn"
;;
13)
package_install "xcompmgr transset-df"
;;
14)
package_install "zathura"
;;
"d")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
} #}}}
print_title "DESKTOP ENVIRONMENT|WINDOW MANAGER"
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."
echo -e "Select your DE or WM:\n"
echo " --- DE --- --- WM ---"
echo " 1) Cinnamon 8) Awesome"
echo " 2) E17 9) Fluxbox"
echo " 3) GNOME 10) OpenBox"
echo " 4) KDE"
echo " 5) LXDE"
echo " 6) Mate"
echo " 7) XFCE"
echo ""
echo " b) BACK"
read_input $DESKTOPENV
case "$OPTION" in
1)
#CINNAMON {{{
print_title "CINNAMON - https://wiki.archlinux.org/index.php/Cinnamon"
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."
package_install "cinnamon"
package_install "cinnamon-screensaver cinnamon-control-center"
package_install "gedit-plugins"
package_install "telepathy"
package_install "gksu xdg-user-dirs-gtk gucharmap"
package_install "gvfs-smb gvfs-afc"
aur_package_install "gnome-defaults-list"
# extensions
aur_package_install "cinnamon-applet-screenshot-record"
aur_package_install "cinnamon-extension-coverflow-alt-tab"
# config xinitrc
config_xinitrc "gnome-session-cinnamon"
#Tweaks
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-effect scale
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-time 250
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-close-transition easeInExpo
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-effect scale
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-time 350
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-map-transition easeOutBack
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-effect scale
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-time 150
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-maximize-transition easeInOutSine
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-effect scale
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-time 250
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-minimize-transition easeInOutSine
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-effect scale
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-time 150
sudo -u ${USER_NAME} gsettings set org.cinnamon desktop-effects-unmaximize-transition easeInOutSine
CINNAMON=1
pause_function
install_themes "CINNAMON"
#Gnome Display Manager (a reimplementation of xdm)
system_ctl enable gdm
#D-Bus interface for user account query and manipulation
system_ctl enable accounts-daemon
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
2)
#E17 {{{
print_title "E17 - http://wiki.archlinux.org/index.php/E17"
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."
package_install "enlightenment17"
package_install "gvfs"
package_install "xdg-user-dirs"
package_install "leafpad epdfview"
package_install "lxappearance"
package_install "ttf-bitstream-vera ttf-dejavu"
aur_package_install "gnome-defaults-list"
# config xinitrc
config_xinitrc "enlightenment_start"
pause_function
install_misc_apps "E17"
install_themes "E17"
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
3)
#GNOME {{{
print_title "GNOME - https://wiki.archlinux.org/index.php/GNOME"
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."
package_install "gnome gnome-extra zeitgeist telepathy"
package_install "gksu nautilus-open-terminal gedit-plugins gnome-tweak-tool gnome-power-manager gucharmap"
package_install "gvfs-smb gvfs-afc gvfs-goa"
package_install "deja-dup"
package_install "gnome-packagekit gnome-settings-daemon-updates"
aur_package_install "gnome-defaults-list"
# empathy theme
package_install "python2-distutils-extra"
aur_package_install "empathy-theme-ubuntu-adium-bzr"
# config xinitrc
config_xinitrc "gnome-session"
GNOME=1
pause_function
install_themes "GNOME"
#Gnome Display Manager (a reimplementation of xdm)
system_ctl enable gdm
#D-Bus interface for user account query and manipulation
system_ctl enable accounts-daemon
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
#Improvements
add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
;;
#}}}
4)
#KDE {{{
print_title "KDE - https://wiki.archlinux.org/index.php/KDE"
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."
kde_install=("Full install" "Minimal install");
PS3="$prompt1"
echo -e "Select kde installation: \n"
select OPT in "${kde_install[@]}"; do
case "$REPLY" in
1)
package_install "kde phonon-gstreamer kde-l10n-$LOCALE_KDE kipi-plugins"
package_remove "kdemultimedia-kscd kdemultimedia-juk kdebase-kwrite kdenetwork-kopete kdebase-konqueror"
package_install "kde-telepathy telepathy"
break
;;
2)
package_install "kdebase phonon-gstreamer kde-l10n-$LOCALE_KDE"
break
;;
*)
invalid_option
;;
esac
done
package_install "xdg-user-dirs"
aur_package_install "kde-gtk-config"
aur_package_install "oxygen-gtk2 oxygen-gtk3 qtcurve-gtk2 qtcurve-kde4"
# config xinitrc
config_xinitrc "startkde"
pause_function
#QTCURVE THEMES #{{{
curl -o Sweet.tar.gz http://kde-look.org/CONTENT/content-files/144205-Sweet.tar.gz
curl -o Kawai.tar.gz http://kde-look.org/CONTENT/content-files/141920-Kawai.tar.gz
tar zxvf Sweet.tar.gz
tar zxvf Kawai.tar.gz
rm Sweet.tar.gz
rm Kawai.tar.gz
mkdir -p /home/${USER_NAME}/.kde4/share/apps/color-schemes
mv Sweet/*.colors /home/${USER_NAME}/.kde4/share/apps/color-schemes
mv Kawai/*.colors /home/${USER_NAME}/.kde4/share/apps/color-schemes
mkdir -p /home/${USER_NAME}/.kde4/share/apps/QtCurve
mv Sweet/Sweet.qtcurve /home/${USER_NAME}/.kde4/share/apps/QtCurve
mv Kawai/Kawai.qtcurve /home/${USER_NAME}/.kde4/share/apps/QtCurve
chown -R ${USER_NAME}:users /home/${USER_NAME}/.kde4
rm -fr Kawai Sweet
#}}}
#KDE CUSTOMIZATION {{{
while true
do
print_title "KDE CUSTOMIZATION"
echo " 1) $(menu_item "apper")"
echo " 2) $(menu_item "choqok")"
echo " 3) $(menu_item "digikam")"
echo " 4) $(menu_item "k3b")"
echo " 5) $(menu_item "rosa-icons") $AUR"
echo " 6) $(menu_item "caledonia-bundle") $AUR"
echo " 7) $(menu_item "skrooge")"
echo " 8) $(menu_item "yakuake")"
echo ""
echo " d) DONE"
echo ""
KDE_OPTIONS+=" d"
read_input_options "$KDE_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "apper"
;;
2)
package_install "choqok"
;;
3)
package_install "digikam"
;;
4)
package_install "k3b cdrdao dvd+rw-tools"
;;
5)
aur_package_install "rosa-icons"
;;
6)
aur_package_install "caledonia-bundle"
;;
7)
package_install "skrooge"
;;
8)
package_install "yakuake"
aur_package_install "yakuake-skin-plasma-oxygen-panel"
;;
"d")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
system_ctl enable kdm
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
# Tweaks
# nepomuk
add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
# pulseaudio
add_line "load-module module-device-manager" "/etc/pulse/default.pa"
# speed up application startup
mkdir -p ~/.compose-cache
KDE=1
;;
#}}}
5)
#LXDE {{{
print_title "LXDE - http://wiki.archlinux.org/index.php/lxde"
print_info "LXDE is a free and open source desktop environment for Unix and other POSIX compliant platforms, such as Linux or BSD. The goal of the project is to provide a desktop environment that is fast and energy efficient."
package_install "lxde"
package_install "gvfs upower"
package_install "xdg-user-dirs"
package_install "leafpad obconf epdfview"
aur_package_install "gnome-defaults-list"
mkdir -p /home/${USER_NAME}/.config/openbox/
cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${USER_NAME}/.config/openbox/
chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
# config xinitrc
config_xinitrc "startlxde"
pause_function
install_misc_apps "LXDE"
install_themes "LXDE"
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
6)
#MATE {{{
print_title "MATE - https://wiki.archlinux.org/index.php/Mate"
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."
add_repository "mate" "http://repo.mate-desktop.org/archlinux/\$arch"
package_install "mate mate-extras"
package_install "gvfs"
aur_package_install "gnome-defaults-list"
# config xinitrc
config_xinitrc "mate-session"
pause_function
install_themes "MATE"
#D-Bus interface for user account query and manipulation
system_ctl enable accounts-daemon
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
7)
#XFCE {{{
print_title "XFCE - https://wiki.archlinux.org/index.php/Xfce"
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."
package_install "xfce4 xfce4-goodies mupdf"
package_install "gvfs"
package_install "xdg-user-dirs"
aur_package_install "gnome-defaults-list"
# config xinitrc
config_xinitrc "startxfce4"
pause_function
install_display_manager
install_themes "XFCE"
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
8)
#AWESOME {{{
print_title "AWESOME - http://wiki.archlinux.org/index.php/Awesome"
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."
package_install "awesome"
package_install "gvfs"
package_install "lxappearance"
package_install "leafpad epdfview nitrogen"
package_install "ttf-bitstream-vera ttf-dejavu"
aur_package_install "gnome-defaults-list"
if [[ ! -d /home/${USER_NAME}/.config/awesome/ ]]; then
mkdir -p /home/${USER_NAME}/.config/awesome/
cp /etc/xdg/awesome/rc.lua /home/${USER_NAME}/.config/awesome/
chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
fi
# config xinitrc
config_xinitrc "awesome"
pause_function
install_misc_apps "AWESOME"
install_themes "AWESOME"
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
9)
#FLUXBOX {{{
print_title "FLUXBOX - http://wiki.archlinux.org/index.php/Fluxbox"
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."
package_install "fluxbox menumaker"
package_install "lxappearance"
package_install "xdg-user-dirs"
package_install "leafpad epdfview"
package_install "ttf-bitstream-vera ttf-dejavu"
aur_package_install "gnome-defaults-list"
# config xinitrc
config_xinitrc "startfluxbox"
install_misc_apps "FLUXBOX"
install_themes "FLUXBOX"
pause_function
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
10)
#OPENBOX {{{
print_title "OPENBOX - http://wiki.archlinux.org/index.php/Openbox"
print_info "Openbox is a lightweight and highly configurable window manager with extensive standards support."
package_install "openbox obconf obmenu menumaker"
package_install "lxappearance"
package_install "xdg-user-dirs"
package_install "leafpad epdfview nitrogen"
package_install "ttf-bitstream-vera ttf-dejavu"
aur_package_install "gnome-defaults-list"
mkdir -p /home/${USER_NAME}/.config/openbox/
cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} /home/${USER_NAME}/.config/openbox/
chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
# config xinitrc
config_xinitrc "openbox-session"
pause_function
install_misc_apps "OPENBOX"
install_themes "OPENBOX"
#Abstraction for enumerating power devices, listening to device events and querying history and statistics
system_ctl enable upower
;;
#}}}
"b")
break
;;
*)
invalid_option
;;
esac
#MTP SUPPORT {{{
if is_package_installed "libmtp" ; then
[[ ${KDE} -eq 1 ]] && package_install "kio-mtp" || package_install "gvfs-mtp"
fi
#}}}
}
#}}}
#CONNMAN/NETWORKMANAGER/WICD {{{
install_nm_wicd(){
print_title "NETWORK MANAGER"
echo " 1) Networkmanager"
echo " 2) Wicd"
echo " 3) ConnMan"
echo ""
echo " n) NONE"
echo ""
read_input $NETWORKMANAGER
case "$OPTION" in
1)
print_title "NETWORKMANAGER - https://wiki.archlinux.org/index.php/Networkmanager"
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."
if [[ ${KDE} -eq 1 ]]; then
package_install "networkmanager dnsmasq kdeplasma-applets-networkmanagement"
else
package_install "networkmanager dnsmasq network-manager-applet"
fi
is_package_installed "ntp" && package_install "networkmanager-dispatcher-ntpd"
# Network Management daemon
system_ctl enable NetworkManager
pause_function
;;
2)
print_title "WICD - https://wiki.archlinux.org/index.php/Wicd"
print_info "Wicd is a network connection manager that can manage wireless and wired interfaces, similar and an alternative to NetworkManager."
if [[ ${KDE} -eq 1 ]]; then
aur_package_install "wicd wicd-kde"
else
package_install "wicd wicd-gtk"
fi
# WICD daemon
system_ctl enable wicd
pause_function
;;
3)
print_title "CONNMAN - https://wiki.archlinux.org/index.php/Connman"
print_info "ConnMan is an alternative to NetworkManager and Wicd and was created by Intel and the Moblin project for use with embedded devices."
package_install "connman "
# ConnMan daemon
system_ctl enable connman
pause_function
;;
esac
}
#}}}
#USB 3G MODEM {{{
install_usb_modem(){
print_title "USB 3G MODEM - https://wiki.archlinux.org/index.php/USB_3G_Modem"
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."
read_input_text "Install usb 3G modem support" $USBMODEM
if [[ $OPTION == y ]]; then
package_install "usbutils usb_modeswitch"
is_package_installed "networkmanager" && package_install "modemmanager" || package_install "wvdial"
pause_function
fi
}
#}}}
#ACCESSORIES {{{
install_accessories_apps(){
while true
do
print_title "ACCESSORIES APPS"
echo " 1) $(menu_item "cairo-dock")"
echo " 2) $(menu_item "catfish")"
echo " 3) $(menu_item "conky-lua") $AUR"
echo " 4) $(menu_item "docky") $AUR"
echo " 5) $(menu_item "galculator") $AUR"
echo " 6) $(menu_item "terra-bzr") $AUR"
echo " 7) $(menu_item "kupfer") $AUR"
echo " 8) $(menu_item "pyrenamer") $AUR"
echo " 9) $(menu_item "shutter") $AUR"
echo "10) $(menu_item "stormcloud") $AUR"
echo "11) $(menu_item "synapse")"
echo "12) $(menu_item "terminator")"
echo "13) $(menu_item "zim")"
echo ""
echo " b) BACK"
echo ""
ACCESSORIES_OPTIONS+=" b"
read_input_options "$ACCESSORIES_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "cairo-dock cairo-dock-plugins"
;;
2)
package_install "catfish"
;;
3)
aur_package_install "conky-lua"
;;
4)
package_install "docky"
aur_package_install "dockmanager"
;;
5)
package_install "galculator"
;;
6)
aur_package_install "terra-bzr"
;;
7)
aur_package_install "kupfer"
;;
8)
aur_package_install "pyrenamer"
;;
9)
aur_package_install "shutter"
;;
10)
aur_package_install "stormcloud"
;;
11)
package_install "synapse"
;;
12)
package_install "terminator"
;;
13)
package_install "zim"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#DEVELOPEMENT {{{
install_development_apps(){
while true
do
print_title "DEVELOPMENT APPS"
echo " 1) $(menu_item "aptana-studio") $AUR"
echo " 2) $(menu_item "bluefish")"
echo " 3) $(menu_item "eclipse")"
echo " 4) $(menu_item "emacs")"
echo " 5) $(menu_item "gvim")"
echo " 6) $(menu_item "geany")"
echo " 7) $(menu_item "intellij-idea-community-edition" "IntelliJ IDEA")"
echo " 8) $(menu_item "kdevelop")"
echo " 9) $(menu_item "lighttable") $AUR"
echo "10) $(menu_item "monodevelop")"
echo "11) $(menu_item "netbeans")"
echo "12) $(menu_item "nodejs")"
echo "13) $(menu_item "jdk7-openjdk" "OpenJDK")"
echo "14) $(menu_item "jdk" "Oracle JDK") $AUR"
echo "15) $(menu_item "qtcreator")"
echo "16) $(menu_item "sublime-text" "Sublime Text") $AUR"
echo "17) $(menu_item "gdb" "Debuggers")"
echo "18) $(menu_item "mysql-workbench-gpl" "MySQL Workbench") $AUR"
echo "19) $(menu_item "dbschema") $AUR"
echo "20) $(menu_item "meld")"
echo ""
echo " b) BACK"
echo ""
DEVELOPMENT_OPTIONS+=" b"
read_input_options "$DEVELOPMENT_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "aptana-studio"
;;
2)
package_install "bluefish"
;;
3)
#ECLIPSE {{{
while true
do
print_title "ECLIPSE - https://wiki.archlinux.org/index.php/Eclipse"
print_info "Eclipse is an open source community project, which aims to provide a universal development platform."
echo " 1) $(menu_item "eclipse")"
echo " 2) $(menu_item "eclipse-cdt" "Eclipse IDE for C/C++ Developers")"
echo " 3) $(menu_item "eclipse-android" "Android Development Tools for Eclipse") $AUR"
echo " 4) $(menu_item "eclipse-wtp-wst" "Web Development Tools for Eclipse") $AUR"
echo " 5) $(menu_item "eclipse-pdt" "PHP Development Tools for Eclipse ") $AUR"
echo " 6) $(menu_item "eclipse-pydev" "Python Development Tools for Eclipse") $AUR"
echo " 7) $(menu_item "eclipse-aptana" "Aptana Studio plugin for Eclipse") $AUR"
echo " 8) $(menu_item "eclipse-vrapper" "Vim-like editing plugin for Eclipse ") $AUR"
echo " 9) $(menu_item "eclipse-egit" "Git support plugin for Eclipse") $AUR"
echo "10) $(menu_item "eclipse-eclipsecolortheme" "Eclipse Colortheme") $AUR"
echo ""
echo " b) BACK"
echo ""
ECLIPSE_OPTIONS+=" b"
read_input_options "$ECLIPSE_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "eclipse"
;;
2)
package_install "eclipse-cdt"
;;
3)
aur_package_install "android-sdk android-apktool android-sdk-build-tools android-sdk-platform-tools android-udev eclipse-android libmtp"
if [[ ${KDE} -eq 1 ]]; then
package_install "kio-mtp"
else
package_install "gvfs-mtp"
fi
aur_package_install "simple-mtpfs"
groupadd android
add_user_to_group ${USER_NAME} android
add_user_to_group ${USER_NAME} adbusers
chgrp -R android /opt/android-sdk
chmod -R g+w /opt/android-sdk
find /opt/android-sdk -type d -exec chmod g+s {} \;
;;
4)
aur_package_install "eclipse-wtp-wst"
;;
5)
aur_package_install "eclipse-pdt"
;;
6)
aur_package_install "eclipse-pydev"
;;
7)
aur_package_install "eclipse-aptana"
;;
8)
aur_package_install "eclipse-vrapper"
;;
9)
aur_package_install "eclipse-egit"
;;
10)
aur_package_install "eclipse-eclipsecolortheme"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=3
;;
4)
package_install "emacs"
;;
5)
package_remove "vim"
package_install "gvim ctags"
;;
6)
package_install "geany"
;;
7)
package_install "intellij-idea-community-edition"
;;
8)
package_install "kdevelop"
;;
9)
aur_package_install "lighttable"
;;
10)
package_install "monodevelop monodevelop-debugger-gdb"
;;
11)
package_install "netbeans"
;;
12)
package_install "nodejs"
#NODEJS {{{
while true
do
print_title "NODEJS - http://nodejs.org"
print_info "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."
echo " 1) backbone"
echo " 2) coffee-script"
echo " 3) express"
echo " 4) grunt"
echo " 5) jshint"
echo " 6) jslint"
echo " 7) less"
echo " 8) markdown"
echo " 9) mocha"
echo "10) stylus"
echo "11) uglify-js"
echo "12) underscore"
echo ""
echo " b) BACK"
echo ""
NODEJS_OPTIONS+=" b"
read_input_options "$NODEJS_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
npm_install "backbone"
;;
2)
npm_install "coffee-script"
;;
3)
npm_install "express"
;;
4)
npm_install "grunt"
;;
5)
npm_install "jshint"
;;
6)
npm_install "jslint"
;;
7)
npm_install "less"
;;
8)
npm_install "markdown"
;;
9)
npm_install "mocha"
;;
10)
npm_install "stylus"
;;
11)
npm_install "uglify-js"
;;
12)
npm_install "underscore"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=11
;;
13)
package_remove "jdk"
package_install "jdk7-openjdk icedtea-web-java7"
;;
14)
package_remove "jre7-openjdk"
package_remove "jdk7-openjdk"
aur_package_install "jdk"
;;
15)
package_install "qtcreator"
mkdir -p /home/${USER_NAME}/.config/Nokia/qtcreator/styles
curl -o monokai.xml http://angrycoding.googlecode.com/svn/branches/qt-creator-monokai-theme/monokai.xml
mv monokai.xml /home/${USER_NAME}/.config/Nokia/qtcreator/styles/
chown -R ${USER_NAME}:users /home/${USER_NAME}/.config
;;
16)
aur_package_install "sublime-text"
;;
17)
package_install "splint valgrind gdb" #C/C++
aur_package_install "php-codesniffer php-tidy" #PHP
aur_package_install "closure-compiler" #Javascript
aur_package_install "tidyhtml" #HTML
;;
18)
aur_package_install "mysql-workbench-gpl"
;;
19)
aur_package_install "dbschema"
;;
20)
package_install "meld"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#OFFICE {{{
install_office_apps(){
while true
do
print_title "OFFICE APPS"
echo " 1) $(menu_item "libreoffice-common" "LibreOffice")"
echo " 2) $(menu_item "goffice calligra" "$([[ ${KDE} -eq 1 ]] && echo "Caligra" || echo "Abiword + Gnumeric";)")"
echo " 3) $(menu_item "texlive-core" "latex")"
echo " 4) $(menu_item "calibre")"
echo " 5) $(menu_item "everpad") $AUR"
echo " 6) $(menu_item "gcstar")"
echo " 7) $(menu_item "homebank")"
echo " 8) $(menu_item "impressive")"
echo " 9) $(menu_item "nitrotasks") $AUR"
echo "10) $(menu_item "ocrfeeder")"
echo "11) $(menu_item "uberwriter") $AUR"
echo "12) $(menu_item "xmind") $AUR"
echo ""
echo " b) BACK"
echo ""
OFFICE_OPTIONS+=" b"
read_input_options "$OFFICE_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
print_title "LIBREOFFICE - https://wiki.archlinux.org/index.php/LibreOffice"
package_install "libreoffice-$LOCALE_LO libreoffice-common libreoffice-base libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-math libreoffice-writer"
aur_package_install "hunspell-$LOCALE_HS"
aur_package_install "aspell-$LOCALE_AS"
[[ ${KDE} -eq 1 ]] && package_install "libreoffice-kde4" || package_install "libreoffice-gnome"
;;
2)
if [[ ${KDE} -eq 1 ]]; then
package_install "calligra"
else
package_install "gnumeric abiword abiword-plugins"
fi
aur_package_install "hunspell-$LOCALE_HS"
aur_package_install "aspell-$LOCALE_AS"
;;
3)
package_install "texlive-most"
if [[ $LOCALE == pt_BR ]]; then
aur_package_install "abntex"
fi
read_input_text "Install texmaker?"
[[ $OPTION == y ]] && aur_package_install "texmaker"
;;
4)
package_install "calibre"
;;
5)
package_install "everpad"
;;
6)
package_install "gcstar"
;;
7)
package_install "homebank"
;;
8)
package_install "impressive"
;;
9)
aur_package_install "nitrotasks"
;;
10)
package_install "ocrfeeder tesseract gocr"
aur_package_install "aspell-$LOCALE_AS"
;;
11)
aur_package_install "uberwriter"
;;
12)
aur_package_install "xmind"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#SYSTEM TOOLS {{{
install_system_apps(){
while true
do
print_title "SYSTEM TOOLS APPS"
echo " 1) $(menu_item "clamav")"
echo " 2) $(menu_item "firewalld")"
echo " 3) $(menu_item "ufw")"
echo " 4) $(menu_item "gparted")"
echo " 5) $(menu_item "grsync")"
echo " 6) $(menu_item "htop")"
echo " 7) $(menu_item "virtualbox")"
echo " 8) $(menu_item "webmin")"
echo " 9) $(menu_item "wine")"
echo ""
echo " b) BACK"
echo ""
SYSTEMTOOLS_OPTIONS+=" b"
read_input_options "$SYSTEMTOOLS_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "clamav"
sed -i '/Example/d' /etc/clamav/freshclam.conf
sed -i '/Example/d' /etc/clamav/clamd.conf
system_ctl enable clamd
freshclam
;;
2)
print_title "FirewallD - https://fedoraproject.org/wiki/FirewallD"
print_info "firewalld provides a dynamically managed firewall with support for network/firewall zones to define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings and for ethernet bridges and has a separation of runtime and persistent configuration options. It also supports an interface fors or applications to add firewall rules directly."
is_package_installed "ufw" && package_remove "ufw"
is_package_installed "firewalld" && package_remove "firewalld"
package_install "firewalld"
system_ctl enable firewalld
;;
3)
print_title "UFW - https://wiki.archlinux.org/index.php/Ufw"
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."
is_package_installed "ufw" && package_remove "ufw"
aur_package_install "ufw gufw"
system_ctl enable ufw
;;
4)
package_install "gparted"
;;
5)
package_install "grsync"
;;
6)
package_install "htop"
;;
7)
#Make sure we are not a VirtualBox Guest
VIRTUALBOX_GUEST=`dmidecode --type 1 | grep VirtualBox`
if [[ -z ${VIRTUALBOX_GUEST} ]]; then
package_install "virtualbox virtualbox-host-modules virtualbox-guest-iso"
aur_package_install "virtualbox-ext-oracle"
add_module "vboxdrv vboxnetflt" "virtualbox-host"
modprobe vboxdrv vboxnetflt
add_user_to_group ${USER_NAME} vboxusers
else
cecho " ${BBlue}[${Reset}${Bold}!${BBlue}]${Reset} VirtualBox was not installed as we are a VirtualBox guest."
fi
;;
8)
package_install "webmin perl-net-ssleay"
system_ctl enable webmin
;;
9)
package_install "icoutils wine wine_gecko wine-mono winetricks"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#GRAPHICS {{{
install_graphics_apps(){
while true
do
print_title "GRAPHICS APPS"
echo " 1) $(menu_item "blender")"
echo " 2) $(menu_item "gimp")"
echo " 3) $(menu_item "gradiator")"
echo " 4) $(menu_item "gthumb")"
echo " 5) $(menu_item "inkscape")"
echo " 6) $(menu_item "mcomix")"
echo " 7) $(menu_item "mypaint")"
echo " 8) $(menu_item "pencil") [Prototyping Tool] $AUR"
echo " 9) $(menu_item "scribus")"
echo "10) $(menu_item "shotwell")"
echo "11) $(menu_item "simple-scan")"
echo "12) $(menu_item "xnviewmp") $AUR"
echo ""
echo " b) BACK"
echo ""
GRAPHICS_OPTIONS+=" b"
read_input_options "$GRAPHICS_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "blender"
;;
2)
package_install "gimp"
aur_package_install "gimphelp-scriptfu gimp-paint-studio gimpfx-foundry"
;;
3)
aur_package_install "gradiator"
;;
4)
package_install "gthumb"
;;
5)
package_install "inkscape python2-numpy python-lxml"
aur_package_install "sozi"
;;
6)
package_install "mcomix"
;;
7)
package_install "mypaint"
;;
8)
aur_package_install "pencil"
;;
9)
package_install "scribus"
;;
10)
package_install "shotwell"
;;
11)
package_install "simple-scan"
;;
12)
aur_package_install "xnviewmp"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#INTERNET {{{
install_internet_apps(){
while true
do
print_title "INTERNET APPS"
echo " 1) Browser"
echo " 2) Download|Fileshare"
echo " 3) Email|RSS"
echo " 4) Instant Messaging|IRC"
echo " 5) Mapping Tools"
echo " 6) VNC|Desktop Share"
echo ""
echo " b) BACK"
echo ""
INTERNET_OPTIONS+=" b"
read_input_options "$INTERNET_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
#BROWSER {{{
while true
do
print_title "BROWSER"
echo " 1) $(menu_item "chromium")"
echo " 2) $(menu_item "google-chrome") $AUR"
echo " 3) $(menu_item "rekonq midori" "$([[ ${KDE} -eq 1 ]] && echo "Rekonq" || echo "Midori";)")"
echo " 4) $(menu_item "firefox")"
echo " 5) $(menu_item "opera")"
echo ""
echo " b) BACK"
echo ""
BROWSERS_OPTIONS+=" b"
read_input_options "$BROWSERS_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "chromium"
aur_package_install "chromium-pepper-flash chromium-libpdf"
;;
2)
aur_package_install "google-chrome"
;;
3)
if [[ ${KDE} -eq 1 ]]; then
package_install "rekonq"
else
package_install "midori"
fi
;;
4)
package_install "firefox firefox-i18n-$LOCALE_FF firefox-adblock-plus flashplugin "
# speedup firefox load
package_install "upx"
upx --best /usr/lib/firefox/firefox
;;
5)
package_install "opera"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=1
;;
2)
#DOWNLOAD|FILESHARE {{{
while true
do
print_title "DOWNLOAD|FILESHARE"
echo " 1) $(menu_item "aerofs") $AUR"
echo " 2) $(menu_item "bittorrent-sync" "BitTorrent Sync") $AUR"
echo " 3) $(menu_item "deluge")"
echo " 4) $(menu_item "dropbox") $AUR"
echo " 5) $(menu_item "jdownloader") $AUR"
echo " 6) $(menu_item "nitroshare") $AUR"
echo " 7) $(menu_item "sparkleshare")"
echo " 8) $(menu_item "spideroak") $AUR"
echo " 9) $(menu_item "steadyflow-bzr") $AUR"
echo "10) $(menu_item "transmission-qt transmission-gtk" "Transmission")"
echo ""
echo " b) BACK"
echo ""
DOWNLOAD_OPTIONS+=" b"
read_input_options "$DOWNLOAD_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "aerofs"
;;
2)
aur_package_install "bittorrent-sync"
;;
3)
package_install "deluge"
;;
4)
aur_package_install "dropbox"
if is_package_installed "nautilus" ; then
aur_package_install "nautilus-dropbox"
elif is_package_installed "thunar" ; then
aur_package_install "thunar-dropbox"
elif is_package_installed "kdebase-dolphin" ; then
aur_package_install "kfilebox"
else
aur_package_install "dropbox-cli"
fi
add_line "fs.inotify.max_user_watches = 524288" "/etc/sysctl.d/99-sysctl.conf"
;;
5)
aur_package_install "jdownloader"
;;
6)
aur_package_install "nitroshare"
;;
7)
package_install "sparkleshare"
;;
8)
aur_package_install "spideroak"
;;
9)
aur_package_install "steadyflow-bzr"
;;
10)
if [[ ${KDE} -eq 1 ]]; then
package_install "transmission-qt"
else
package_install "transmission-gtk"
fi
if [[ -f /home/${USER_NAME}/.config/transmission/settings.json ]]; then
replace_line '"blocklist-enabled": false' '"blocklist-enabled": true' /home/${USER_NAME}/.config/transmission/settings.json
replace_line "www\.example\.com\/blocklist" "list\.iblocklist\.com\/\?list=bt_level1&fileformat=p2p&archiveformat=gz" /home/${USER_NAME}/.config/transmission/settings.json
fi
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=2
;;
3)
#EMAIL {{{
while true
do
print_title "EMAIL|RSS"
echo " 1) $(menu_item "thunderbird")"
echo " 2) $(menu_item "liferea")"
echo ""
echo " b) BACK"
echo ""
EMAIL_OPTIONS+=" b"
read_input_options "$EMAIL_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "thunderbird thunderbird-i18n-$LOCALE_TB"
;;
2)
package_install "liferea"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=3
;;
4)
#IM|IRC {{{
while true
do
print_title "IM - INSTANT MESSAGING"
echo " 1) $(menu_item "emesene")"
echo " 2) $(menu_item "google-talkplugin") $AUR"
echo " 3) $(menu_item "pidgin")"
echo " 4) $(menu_item "skype")"
echo " 5) $(menu_item "teamspeak3")"
echo " 6) $(menu_item "irssi")"
echo " 7) $(menu_item "konversation hexchat" "$([[ ${KDE} -eq 1 ]] && echo "Quassel" || echo "X-Chat";)")"
echo ""
echo " b) BACK"
echo ""
IM_OPTIONS+=" b"
read_input_options "$IM_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "emesene"
;;
2)
aur_package_install "google-talkplugin"
;;
3)
package_install "pidgin"
;;
4)
is_package_installed "ekiga" && package_remove "ekiga"
package_install "skype"
;;
5)
package_install "teamspeak3"
;;
6)
package_install "irssi"
;;
7)
if [[ ${KDE} -eq 1 ]]; then
package_install "konversation"
else
package_install "hexchat"
fi
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=4
;;
5)
#MAPPING {{{
while true
do
print_title "MAPPING TOOLS"
echo " 1) $(menu_item "google-earth") $AUR"
echo " 2) $(menu_item "worldwind" "NASA World Wind") $AUR"
echo ""
echo " b) BACK"
echo ""
MAPPING_OPTIONS+=" b"
read_input_options "$MAPPING_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "google-earth"
;;
2)
aur_package_install "worldwind"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=5
;;
6)
#DESKTOP SHARE {{{
while true
do
print_title "DESKTOP SHARE"
echo " 1) $(menu_item "remmina")"
echo " 2) $(menu_item "teamviewer") $AUR"
echo ""
echo " b) BACK"
echo ""
VNC_OPTIONS+=" b"
read_input_options "$VNC_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "remmina"
;;
2)
aur_package_install "teamviewer"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=6
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#AUDIO {{{
install_audio_apps(){
while true
do
print_title "AUDIO APPS"
echo " 1) Players"
echo " 2) Editors|Tools"
echo " 3) Codecs"
echo ""
echo " b) BACK"
echo ""
AUDIO_OPTIONS+=" b"
read_input_options "$AUDIO_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
#PLAYERS {{{
while true
do
print_title "AUDIO PLAYERS"
echo " 1) $(menu_item "amarok")"
echo " 2) $(menu_item "audacious")"
echo " 3) $(menu_item "banshee")"
echo " 4) $(menu_item "clementine")"
echo " 5) $(menu_item "deadbeef")"
echo " 6) $(menu_item "exaile") $AUR"
echo " 7) $(menu_item "musique") $AUR"
echo " 8) $(menu_item "nuvolaplayer") $AUR"
echo " 9) $(menu_item "rhythmbox")"
echo "10) $(menu_item "radiotray") $AUR"
echo "11) $(menu_item "spotify") $AUR"
echo "12) $(menu_item "tomahawk") $AUR"
echo "13) $(menu_item "timidity++")"
echo "14) $(menu_item "xnoise")"
echo ""
echo " b) BACK"
echo ""
AUDIO_PLAYER_OPTIONS+=" b"
read_input_options "$AUDIO_PLAYER_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
package_install "amarok"
;;
2)
package_install "audacious audacious-plugins"
;;
3)
package_install "banshee"
;;
4)
package_install "clementine"
;;
5)
package_install "deadbeef"
;;
6)
aur_package_install "exaile"
;;
7)
aur_package_install "musique"
;;
8)
aur_package_install "nuvolaplayer"
;;
9)
package_install "rhythmbox grilo grilo-plugins libgpod libdmapsharing gnome-python python-mako pywebkitgtk"
;;
10)
aur_package_install "radiotray"
;;
11)
aur_package_install "spotify"
;;
12)
aur_package_install "tomahawk"
;;
13)
aur_package_install "timidity++ fluidr3"
echo -e 'soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2' >> /etc/timidity++/timidity.cfg
;;
14)
package_install "xnoise"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=1
;;
2)
#EDITORS {{{
while true
do
print_title "AUDIO EDITORS|TOOLS"
echo " 1) $(menu_item "soundconverter soundkonverter" "$([[ ${KDE} -eq 1 ]] && echo "Soundkonverter" || echo "Soundconverter";)")"
echo " 2) $(menu_item "easytag")"
echo " 3) $(menu_item "audacity")"
echo " 4) $(menu_item "ocenaudio") $AUR"
echo ""
echo " b) BACK"
echo ""
AUDIO_EDITOR_OPTIONS+=" b"
read_input_options "$AUDIO_EDITOR_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
if [[ ${KDE} -eq 1 ]]; then
package_install "soundkonverter"
else
package_install "soundconverter"
fi
;;
2)
package_install "easytag"
;;
3)
package_install "audacity"
;;
4)
aur_package_install "ocenaudio"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=2
;;
3)
package_install "gst-plugins-base gst-plugins-base-libs gst-plugins-good \
gst-plugins-bad gst-plugins-ugly gst-libav"
if is_package_installed "amarok banshee clementine exaile rhythmbox xfburn" ; then
package_install "gstreamer0.10 gstreamer0.10-plugins"
[[ ${KDE} -eq 1 ]] && package_install "phonon-gstreamer"
# Use the 'standard' preset by default. This preset should generally be
# transparent to most people on most music and is already quite high in quality.
# The resulting bitrate should be in the 170-210kbps range, according to music
# complexity.
sudo -u ${USER_NAME} 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"
fi
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
}
#}}}
#VIDEO {{{
install_video_apps(){
while true
do
print_title "VIDEO APPS"
echo " 1) Players"
echo " 2) Editors|Tools"
echo " 3) Codecs"
echo ""
echo " b) BACK"
echo ""
VIDEO_OPTIONS+=" b"
read_input_options "$VIDEO_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
#PLAYERS {{{
while true
do
print_title "VIDEO PLAYERS"
echo " 1) $(menu_item "audience-bzr") $AUR"
echo " 2) $(menu_item "gnome-mplayer")"
echo " 3) $(menu_item "parole")"
echo " 4) $(menu_item "minitube") $AUR"
echo " 5) $(menu_item "miro")"
echo " 6) $(menu_item "rosa-media-player") $AUR"
echo " 7) $(menu_item "smplayer")"
echo " 8) $(menu_item "vlc")"
echo " 9) $(menu_item "xbmc")"
echo ""
echo " b) BACK"
echo ""
VIDEO_PLAYER_OPTIONS+=" b"
read_input_options "$VIDEO_PLAYER_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
aur_package_install "audience-bzr"
;;
2)
package_install "gnome-mplayer"
;;
3)
package_install "parole"
;;
4)
aur_package_install "minitube"
;;
5)
package_install "miro"
;;
6)
aur_package_install "rosa-media-player"
;;
7)
package_install "smplayer smplayer-themes"
;;
8)
package_install "vlc"
if [[ ${KDE} -eq 1 ]]; then
package_install "phonon-vlc"
fi
;;
9)
package_install "xbmc"
add_user_to_group ${USER_NAME} xbmc
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=1
;;
2)
#EDITORS {{{
while true
do
print_title "VIDEO EDITORS|TOOLS"
echo " 1) $(menu_item "avidemux-gtk avidemux-qt" "Avidemux")"
echo " 2) $(menu_item "arista-transcoder" "Arista") $AUR"
echo " 3) $(menu_item "handbrake")"
echo " 4) $(menu_item "transmageddon")"
echo " 5) $(menu_item "kdeenlive")"
echo " 6) $(menu_item "openshot")"
echo " 7) $(menu_item "pitivi")"
echo " 8) $(menu_item "kazam-bzr") $AUR"
echo ""
echo " b) BACK"
echo ""
VIDEO_EDITOR_OPTIONS+=" b"
read_input_options "$VIDEO_EDITOR_OPTIONS"
for OPT in ${OPTIONS[@]}; do
case "$OPT" in
1)
if [[ ${KDE} -eq 1 ]]; then
package_install "avidemux-qt"
else
package_install "avidemux-gtk"
fi
;;
2)
aur_package_install "arista-transcoder"
;;
3)
package_install "handbrake"
;;
4)
package_install "transmageddon"
;;
5)
package_install "kdenlive"
;;
6)
package_install "openshot"
;;
7)
package_install "pitivi"
;;
8)
aur_package_install "kazam-bzr"
;;
"b")
break
;;
*)
invalid_option
;;
esac
done
elihw
done
#}}}
OPT=2
;;
3)
package_install "libbluray libquicktime libdvdread libdvdnav libdvdcss cdrdao"
if [[ $ARCHI == i686 ]];