function v {
  if [ "$(fd -tf -e lua -e py -e rs)" ]; then
    "$EDITOR" "$*"
  else
    nvim --cmd ":lua vim.g.noplugins=1" "$*"
  fi
}

function ytp {
  yt-dlp --add-metadata --no-youtube-include-dash-manifest -i --no-cache-dir --geo-bypass -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "$@"
}

function ytdl {
  yt-dlp --add-metadata --no-youtube-include-dash-manifest -i --no-cache-dir --geo-bypass -P "/mnt/samsung/necropolis/vid/" -o "%(title)s.%(ext)s" "$@"
}

function paclist {
  xpkg -m > ~/.config/xbpaketes
}

function bak {
  doas mount -t nfs 192.168.0.100:/mnt/wd1/graveyard/ /mnt/vb/graveyard
}

function winclass {
  xprop | grep WM_CLASS
}

function xf {
  exiftool -- "$@" | grep -i parameters | sed 's/\(Parameters                      : \)//g'
}

function upd {
  doas xbps-install -Su
  echo "Actualizando la lista de paquetes..."
  paclist
  echo "Listo."
}

function disks {
  echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─"; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; dfc -ds;
}

function cbzip {
  for i in */; do zip -9 -r "${i%/}.cbz" "$i"; done
}
