Make sure you have installed the following commands:
- swaymsg
- jq
- slurp
- awk
# set variable | |
_pkgbase=mpv-full-git | |
_pkgbase_cache_dir="$HOME/.cache/yay" | |
_repo_cache_dir="$HOME/Applications/git" | |
_git_url=https://github.com/mpv-player/mpv.git | |
_git_repo="${_git_url%%.git}" | |
_git_repo="${_git_repo##*.com/}" | |
# prepare source code | |
[ -d "${_pkgbase_cache_dir}" ] || mkdir -p "${_pkgbase_cache_dir}" |
/** | |
* Takes a predicate and a list of values and returns a a tuple (2-item array), | |
* with each item containing the subset of the list that matches the predicate | |
* and the complement of the predicate respectively | |
* | |
* @sig (T -> Boolean, T[]) -> [T[], T[]] | |
* | |
* @param {Function} predicate A predicate to determine which side the element belongs to. | |
* @param {Array} arr The list to partition | |
* |