1
0
Fork 0
dotfiles/common/.config/zsh/config/functions.zsh

20 lines
476 B
Bash
Raw Normal View History

2024-11-11 18:41:26 +01:00
function clipcopy() {
cat "${1:-/dev/stdin}" | xsel --clipboard --input
}
function clippaste() {
xsel --clipboard --output
}
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 whed() {
script=$(which "$1")
[ -e "$script" ] && $EDITOR $(which "$script")
}