feat(revamp): add zsh and neovim configs, add an install script and a dependencies list
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Pacman
|
||||
|
||||
Provides aliases and functions for the [Pacman][1] package manager and
|
||||
frontends.
|
||||
|
||||
## Settings
|
||||
|
||||
It is possible to use a Pacman frontend with the pacman aliases provided by this
|
||||
package as long as that frontend supports the same command line options (The
|
||||
[AUR Helpers][2] page has a good comparison which lists if the command line
|
||||
options are pacman compatible).
|
||||
|
||||
Please note that installing packages with an AUR Helper is not officially
|
||||
supported by Archlinux. It is currently recommended to manually build AUR
|
||||
packages using the [provided instructions][3]. The [aurutils][4] project has a
|
||||
set of small utilities to make this easier.
|
||||
|
||||
To enable a different Pacman frontend, add the following to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_, and replace `'<frontend>'` with the name
|
||||
of the preferred frontend.
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:pacman' frontend '<frontend>'
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
### Pacman
|
||||
|
||||
- `pac` is short for `pacman`.
|
||||
- `paci` installs packages from repositories.
|
||||
- `pacI` installs packages from files.
|
||||
- `pacx` removes packages and unneeded dependencies.
|
||||
- `pacX` removes packages, their configuration, and unneeded dependencies.
|
||||
- `pacq` displays information about a package from the repositories.
|
||||
- `pacQ` displays information about a package from the local database.
|
||||
- `pacs` searches for packages in the repositories.
|
||||
- `pacS` searches for packages in the local database.
|
||||
- `pacu` synchronizes the local package and Arch Build System (requires `abs`)
|
||||
databases against the repositories.
|
||||
- `pacU` synchronizes the local package database against the repositories then
|
||||
upgrades outdated packages.
|
||||
- `pacman-list-orphans` lists orphan packages.
|
||||
- `pacman-remove-orphans` removes orphan packages.
|
||||
|
||||
### Frontends
|
||||
|
||||
## Functions
|
||||
|
||||
- `aurget` clone an aur package.
|
||||
- `pacman-list-explicit` lists explicitly installed pacman packages.
|
||||
- `pacman-list-disowned` lists pacman disowned files.
|
||||
|
||||
## Authors
|
||||
|
||||
_The authors of this module should be contacted via the [issue tracker][5]._
|
||||
|
||||
- [Benjamin Boudreau](https://github.com/dreur)
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[1]: https://www.archlinux.org/pacman/
|
||||
[2]: https://wiki.archlinux.org/title/AUR_helpers#Comparison_tables
|
||||
[3]: https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages
|
||||
[4]: https://github.com/AladW/aurutils
|
||||
[5]: https://github.com/sorin-ionescu/prezto/issues
|
||||
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Lists Pacman disowned files.
|
||||
#
|
||||
# Authors:
|
||||
# Benjamin Boudreau <dreurmail@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function pacman-list-disowned {
|
||||
|
||||
local tmp="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/pacman-disowned-$$"
|
||||
local db="$tmp/db"
|
||||
local fs="$tmp/fs"
|
||||
|
||||
mkdir -p "$tmp"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
pacman --quiet --query --list | sort --unique > "$db"
|
||||
|
||||
find /bin /etc /lib /sbin /usr \
|
||||
! -name lost+found \
|
||||
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
||||
|
||||
comm -23 "$fs" "$db"
|
||||
|
||||
# }
|
||||
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Lists explicitly installed Pacman packages.
|
||||
#
|
||||
# Authors:
|
||||
# Benjamin Boudreau <dreurmail@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# function pacman-list-explicit {
|
||||
|
||||
pacman --query --explicit --info \
|
||||
| awk '
|
||||
BEGIN {
|
||||
FS=":"
|
||||
}
|
||||
/^Name/ {
|
||||
print $2
|
||||
}
|
||||
/^Description/ {
|
||||
print $2
|
||||
}
|
||||
'
|
||||
|
||||
# }
|
||||
@@ -0,0 +1,88 @@
|
||||
#
|
||||
# Defines Pacman aliases.
|
||||
#
|
||||
# Authors:
|
||||
# Benjamin Boudreau <dreurmail@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# Tips:
|
||||
# https://wiki.archlinux.org/index.php/Pacman_Tips
|
||||
#
|
||||
|
||||
# Return if requirements are not found.
|
||||
if (( ! $+commands[pacman] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Frontend
|
||||
#
|
||||
|
||||
# Get the Pacman frontend.
|
||||
zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'
|
||||
|
||||
if (( $+commands[$_pacman_frontend] )); then
|
||||
alias pacman="$_pacman_frontend"
|
||||
else
|
||||
_pacman_frontend='pacman'
|
||||
_pacman_sudo='sudo '
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Pacman.
|
||||
alias pac="${_pacman_frontend}"
|
||||
|
||||
# Installs packages from repositories.
|
||||
alias paci="${_pacman_sudo}${_pacman_frontend} --sync"
|
||||
|
||||
# Installs packages from files.
|
||||
alias pacI="${_pacman_sudo}${_pacman_frontend} --upgrade"
|
||||
|
||||
# Removes packages and unneeded dependencies.
|
||||
alias pacx="${_pacman_sudo}${_pacman_frontend} --remove"
|
||||
|
||||
# Removes packages, their configuration, and unneeded dependencies.
|
||||
alias pacX="${_pacman_sudo}${_pacman_frontend} --remove --nosave --recursive"
|
||||
|
||||
# Displays information about a package from the repositories.
|
||||
alias pacq="${_pacman_frontend} --sync --info"
|
||||
|
||||
# Displays information about a package from the local database.
|
||||
alias pacQ="${_pacman_frontend} --query --info"
|
||||
|
||||
# Searches for packages in the repositories.
|
||||
alias pacs="${_pacman_frontend} --sync --search"
|
||||
|
||||
# Searches for packages in the local database.
|
||||
alias pacS="${_pacman_frontend} --query --search"
|
||||
|
||||
# Lists orphan packages.
|
||||
alias pacman-list-orphans="${_pacman_sudo}${_pacman_frontend} --query --deps --unrequired"
|
||||
|
||||
# Removes orphan packages.
|
||||
alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)"
|
||||
|
||||
# Synchronizes the local package and Arch Build System databases against the
|
||||
# repositories using the asp tool.
|
||||
if (( $+commands[asp] )); then
|
||||
alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && sudo asp update"
|
||||
else
|
||||
alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh"
|
||||
fi
|
||||
|
||||
# Synchronizes the local package database against the repositories then
|
||||
# upgrades outdated packages.
|
||||
alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade"
|
||||
|
||||
function aurget {
|
||||
local target_dir="$1"
|
||||
if [[ -n "$2" ]]; then
|
||||
target_dir="$2"
|
||||
fi
|
||||
git clone "https://aur.archlinux.org/$1" "$target_dir"
|
||||
}
|
||||
|
||||
unset _pacman_{frontend,sudo}
|
||||
Reference in New Issue
Block a user