diff --git a/bash/.alias.sh b/bash/.alias.sh index 64017ca..983e14b 100644 --- a/bash/.alias.sh +++ b/bash/.alias.sh @@ -12,9 +12,9 @@ alias clean-dockers='docker rmi $(docker images -aq -f "dangling=true")' #USAGE cat file.txt | sprunge alias sprunge='curl -F "sprunge=<-" http://sprunge.us' -## pacman and yaourt -alias aur='yaourt --noconfirm' -alias update='yaourt -Syyu --noconfirm --aur' +## pacman and trizen +alias aur='trizen --noconfirm' +alias update='trizen -Syyu --noconfirm' ## systeminfo alias meminfo='free -mth' diff --git a/dependencies/pacman.txt b/dependencies/pacman.txt index 00b15d2..499deb1 100644 --- a/dependencies/pacman.txt +++ b/dependencies/pacman.txt @@ -20,11 +20,10 @@ zenity xorg-xrandr networkmanager eog -yaourt thefuck screenfetch python python-pip gdm neofetch - +git diff --git a/install.sh b/install.sh index 0539036..5fe9d5d 100644 --- a/install.sh +++ b/install.sh @@ -23,6 +23,15 @@ function install_fonts { yes | cp -rf ./fonts/* ~/.local/share/fonts } +# install trizen, a aur helper +function install_trizen { + git clone https://aur.archlinux.org/trizen.git + pushd trizen + makepkg -si + popd + sudo rm -dRf trizen/ +} + # Link basic rice files function install_rice { mkdir -p ~/Pictures/Wallpapers @@ -38,6 +47,8 @@ function install_config { ln -sf "$PWD"/bash/.bashrc ~/.bashrc ln -sf "$PWD"/bash/.alias.sh ~/.alias ln -sf "$PWD"/nano/.nanorc ~/.nanorc + sudo ln -sf "$PWD"/package-managers/pacman.conf /etc/pacman.conf + sudo ln -sf "$PWD"/package-managers/makepkg.conf /etc/makepkg.conf ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json ln -sf "$PWD"/terminal/xfce4-term ~/.config/xfce4/terminal/ mkdir -p ~/.config/gtk-3.0 @@ -52,7 +63,10 @@ function install_file_templates { # Installs the dependencies on Arch Linux function install_dependencies { sudo pacman --force -S $(cat dependencies/pacman.txt | sed ':a;N;$!ba;s/\n/ /g') - yaourt --force -S --noconfirm $(cat dependencies/aur.txt | sed ':a;N;$!ba;s/\n/ /g') + + install_trizen + trizen --force -S --noconfirm $(cat dependencies/aur.txt | sed ':a;N;$!ba;s/\n/ /g') + sudo pip install $(cat dependencies/pip.txt | sed ':a;N;$!ba;s/\n/ /g') } @@ -97,7 +111,7 @@ yes_or_no "Do you want to install the fonts?" && install_fonts # Ask for template file installation yes_or_no "Do you want to install the file templates? (~/Templates)" && install_file_templates -# Ask the user whether it wants to continue +# Ask for i3 rice installation yes_or_no "Are you sure you want to install my i3 rice?" && install_rice # ask to enable gdm diff --git a/package-managers/makepkg.conf b/package-managers/makepkg.conf new file mode 100644 index 0000000..08cc403 --- /dev/null +++ b/package-managers/makepkg.conf @@ -0,0 +1,147 @@ +# +# /etc/makepkg.conf +# + +######################################################################### +# SOURCE ACQUISITION +######################################################################### +# +#-- The download utilities that makepkg should use to acquire sources +# Format: 'protocol::agent' +DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' + 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'rsync::/usr/bin/rsync --no-motd -z %u %o' + 'scp::/usr/bin/scp -C %u %o') + +# Other common tools: +# /usr/bin/snarf +# /usr/bin/lftpget -c +# /usr/bin/wget + +#-- The package required by makepkg to download VCS sources +# Format: 'protocol::package' +VCSCLIENTS=('bzr::bzr' + 'git::git' + 'hg::mercurial' + 'svn::subversion') + +######################################################################### +# ARCHITECTURE, COMPILE FLAGS +######################################################################### +# +CARCH="x86_64" +CHOST="x86_64-pc-linux-gnu" + +#-- Compiler and Linker Flags +# -march (or -mcpu) builds exclusively for an architecture +# -mtune optimizes for an architecture, but builds for whole processor family +CPPFLAGS="-D_FORTIFY_SOURCE=2" +CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" +CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" +LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +#-- Make Flags: change this for DistCC/SMP systems +MAKEFLAGS="-j$(nproc)" +#-- Debugging flags +DEBUG_CFLAGS="-g -fvar-tracking-assignments" +DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" + +######################################################################### +# BUILD ENVIRONMENT +######################################################################### +# +# Defaults: BUILDENV=(!distcc color !ccache check !sign) +# A negated environment option will do the opposite of the comments below. +# +#-- distcc: Use the Distributed C/C++/ObjC compiler +#-- color: Colorize output messages +#-- ccache: Use ccache to cache compilation +#-- check: Run the check() function if present in the PKGBUILD +#-- sign: Generate PGP signature file +# +BUILDENV=(!distcc color !ccache check !sign) +# +#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, +#-- specify a space-delimited list of hosts running in the DistCC cluster. +#DISTCC_HOSTS="" +# +#-- Specify a directory for package building. +#BUILDDIR=/tmp/makepkg + +######################################################################### +# GLOBAL PACKAGE OPTIONS +# These are default values for the options=() settings +######################################################################### +# +# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) +# A negated option will do the opposite of the comments below. +# +#-- strip: Strip symbols from binaries/libraries +#-- docs: Save doc directories specified by DOC_DIRS +#-- libtool: Leave libtool (.la) files in packages +#-- staticlibs: Leave static library (.a) files in packages +#-- emptydirs: Leave empty directories in packages +#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip +#-- purge: Remove files specified by PURGE_TARGETS +#-- upx: Compress binary executable files using UPX +#-- optipng: Optimize PNG images with optipng +#-- debug: Add debugging flags as specified in DEBUG_* variables +# +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) + +#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 +INTEGRITY_CHECK=(md5) +#-- Options to be used when stripping binaries. See `man strip' for details. +STRIP_BINARIES="--strip-all" +#-- Options to be used when stripping shared libraries. See `man strip' for details. +STRIP_SHARED="--strip-unneeded" +#-- Options to be used when stripping static libraries. See `man strip' for details. +STRIP_STATIC="--strip-debug" +#-- Manual (man and info) directories to compress (if zipman is specified) +MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) +#-- Doc directories to remove (if !docs is specified) +DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) +#-- Files to be removed from all packages (if purge is specified) +PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) + +######################################################################### +# PACKAGE OUTPUT +######################################################################### +# +# Default: put built package and cached source in build directory +# +#-- Destination: specify a fixed directory where all packages will be placed +#PKGDEST=/home/packages +#-- Source cache: specify a fixed directory where source files will be cached +#SRCDEST=/home/sources +#-- Source packages: specify a fixed directory where all src packages will be placed +#SRCPKGDEST=/home/srcpackages +#-- Log files: specify a fixed directory where all log files will be placed +#LOGDEST=/home/makepkglogs +#-- Packager: name/email of the person or organization building packages +#PACKAGER="John Doe " +#-- Specify a key to use for package signing +#GPGKEY="" + +######################################################################### +# COMPRESSION DEFAULTS +######################################################################### +# +COMPRESSGZ=(gzip -c -f -n) +COMPRESSBZ2=(bzip2 -c -f) +COMPRESSXZ=(xz -c -z -) +COMPRESSLRZ=(lrzip -q) +COMPRESSLZO=(lzop -q) +COMPRESSZ=(compress -c -f) + +######################################################################### +# EXTENSION DEFAULTS +######################################################################### +# +# WARNING: Do NOT modify these variables unless you know what you are +# doing. +# +PKGEXT='.pkg.tar' +SRCEXT='.src.tar.gz' + +# vim: set ft=sh ts=2 sw=2 et: diff --git a/package-managers/pacman.conf b/package-managers/pacman.conf new file mode 100644 index 0000000..13eaf27 --- /dev/null +++ b/package-managers/pacman.conf @@ -0,0 +1,101 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +#UseDelta = 0.7 +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +ILoveCandy +TotalDownload +CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist + +[community] +Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/package-managers/trizen.conf b/package-managers/trizen.conf new file mode 100644 index 0000000..5f54d78 --- /dev/null +++ b/package-managers/trizen.conf @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +# trizen configuration file +# Updated on Fri Apr 20 10:09:34 2018 + +our $CONFIG = { + ask_for_retry => 1, # bool -- When `makepkg` fails to build a package, offer the option for trying again. + aur_results_last_modified => 1, # bool -- Show the date when the packages were last updated in AUR results. + aur_results_popularity => 1, # bool -- Show the popularity score in AUR results. + aur_results_show_installed => 1, # bool -- Show when a package is installed in AUR results. + aur_results_sort_by => "name", # str -- Sort the AUR results by "name", "votes", "popularity" or "date". + aur_results_sort_order => "ascending", # str -- Sort the AUR results in "ascending" or "descending" order. + aur_results_votes => 1, # bool -- Show the number of votes in AUR results. + clone_dir => "/tmp/trizen-mastermindzh", # str -- Absolute path to the directory where to clone and build packages. + debug => 0, # bool -- Verbose mode. + flip_indices => 0, # bool -- In search+install mode, show the indices of packages in reverse order. + flip_results => 0, # bool -- Show the search results in reverse order. + force => 0, # bool -- Pass the `--force` flag to `pacman`. + git_clone_depth => 0, # int -- Pass the `--depth int` flag to `git clone`. (0 means no limit) + install_built_with_noconfirm => 0, # bool -- Install built packages with `--noconfirm`. + lwp_env_proxy => 1, # bool -- Use proxy settings defined in `env` (if any). + lwp_show_progress => 0, # bool -- Show the HTTPS requests made by LWP::UserAgent to the AUR servers. + lwp_timeout => 60, # int -- Seconds after which an HTTPS connection is aborted. + makepkg_command => "/usr/bin/makepkg -scf", # str -- The `makepkg` command that is used internally in building a package. + movepkg => 0, # bool -- Move built packages in the directory `movepkg_dir`. + movepkg_dir => "/var/cache/pacman/pkg", # str -- Absolute path to the directory where to move built packages (with `movepkg`). + nocolors => 0, # bool -- Disable output colors for `trizen`. + noedit => 0, # bool -- Do not prompt to edit files when installing an AUR package. + noinfo => 0, # bool -- Do not display package information when installing an AUR package. + noinstall => 0, # bool -- Do not install built packages -- builds only. + nopull => 0, # bool -- Do not `git pull` new changes from the AUR git server. + packages_in_stats => 5, # int -- The number of packages to display in `--stats` + pacman_command => "/usr/bin/pacman", # str -- The `pacman` command that is used internally for pacman operations. + pacman_local_dir => "/var/lib/pacman/local", # str -- Absolute path to the pacman's local directory. + pager_mode => 0, # bool -- Show the build files in pager mode using pager. + quiet => 0, # bool -- Do not display any warnings. + recompute_deps => 1, # bool -- Recompute the dependencies of a package after its build files are inspected. + show_build_files_content => 1, # bool -- Show the content of the build files of a package before building it. + show_comments => 0, # bool -- Show AUR comments for a package before building it. + show_diff_only => 0, # bool -- When the build files of a package already exist locally, show the diff only. + show_inexistent => 1, # bool -- Warn about packages that do not exist in AUR, during -Su. + show_ood => 0, # bool -- Warn about out-of-date marked packages, during -Su. + show_unmaintained => 1, # bool -- Warn about unmaintained packages, during -Su. + skipinteg => 0, # bool -- Pass the `--skipinteg` argument to `makepkg`. + split_packages => 1, # bool -- Ask about installing the other parts of a split package. + ssl_verify_hostname => 1, # bool -- Ensure LWP::UserAgent connects to servers that have a valid certificate. + su_command => "/usr/bin/su -c", # str -- Command used when special permissions are required and `use_sudo` is set to 0. + sudo_autorepeat => 0, # bool -- Automatically repeat `sudo -v` in the background after a `sudo` command was first executed. + sudo_autorepeat_at_runtime => 0, # bool -- Execute `sudo -v` when `trizen` is first executed and apply the behavior of `sudo_autorepeat`. + sudo_autorepeat_interval => 180, # int -- Interval, in seconds, after which `sudo -v` is executed in background (with `sudo_autorepeat`). + sudo_command => "/usr/bin/sudo", # str -- Command used when special permissions are required and `use_sudo` is set to 1. + use_sudo => 1, # bool -- Use the `sudo` command when special permissions are required. +}