1
0
Fork 0

cleanup, new function for shell

This commit is contained in:
Luca Bilke 2024-02-28 10:29:08 +01:00
parent 5439c4af71
commit acf9121fa6
3 changed files with 18 additions and 6 deletions

View file

@ -48,9 +48,3 @@ alias \
alias \
x="xbps-install" \
xr="xbps-remove" \
xsi='() {
xpkg -a | \
fzf -q ${1:-""} -m --preview \
"xq {1} | \grep -e pkgver -e license -e short_desc -e installed_size -e maintainer -e repository -e homepage" \
--preview-window=right:66%:wrap | xargs -ro xi
}'

View file

@ -61,3 +61,20 @@ function refresh_xrdb_st() {
killall -USR1 st
}
zle -N refresh_xrdb_st
# Useful functions for usage in the shell
function xsi() {
xpkg -a | \
fzf -q ${1:-""} -m --preview \
"xq {1} | \grep -e pkgver -e license -e short_desc -e installed_size -e maintainer -e repository -e homepage" \
--preview-window=right:66%:wrap | xargs -ro xi
}
function ntfy() {
if "$@"; then
notify-send "$1 success" "$@"
else
notify-send -u critical "$1 failure!" "$@"
fi
}

View file

@ -16,6 +16,7 @@ $YAML::Preserve = 1;
# TODO: Show hook/clone output in a prettier fashion (like docker buildx)
# TODO: Allow branch selection
# TODO: Allow updating a single repo
# TODO: Add flags to allow checking for unclean trees, only cloning, only pulling
# TODO: Check if directories are empty before cloning any repos to allow cloning in any order