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() {
|
2024-11-13 18:30:29 +01:00
|
|
|
local script
|
2024-11-11 18:41:26 +01:00
|
|
|
script=$(which "$1")
|
|
|
|
[ -e "$script" ] && $EDITOR $(which "$script")
|
|
|
|
}
|
2024-11-13 18:30:29 +01:00
|
|
|
|
|
|
|
function hosthost() {
|
|
|
|
local ip
|
|
|
|
ip=$(
|
|
|
|
host -t A "$1" | awk '{print $4}' ||
|
|
|
|
host -t AAAA "$1" | awk '{print $5}'
|
|
|
|
)
|
|
|
|
host "$ip" | awk '{print $5}' | sed 's/.$//'
|
|
|
|
}
|