random changes
This commit is contained in:
parent
2d20408f46
commit
1c4fd52eee
|
@ -35,15 +35,13 @@ run() {
|
|||
#shellcheck disable=SC2068
|
||||
if ! command -v "$1" >/dev/null 2>&1; then
|
||||
printf "%b" "${RED}Cannot execute ${1}${RESET}"
|
||||
exit 1
|
||||
elif "$@"; then
|
||||
exit 1
|
||||
:
|
||||
else
|
||||
printf "%b" "${RED}Failed to run command: ${RESET}"
|
||||
for l in "$@"; do
|
||||
printf "%b" "\n${RED} ${l}${RESET}"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -53,30 +51,72 @@ mimetest() {
|
|||
[ ! -f "${CACHE}.jpg" ] && run pdftoppm -jpeg -f 1 -singlefile "$f" "$CACHE"
|
||||
image "${CACHE}.jpg"
|
||||
;;
|
||||
*/x-bzip-compressed-tar | */x-compressed-tar | */x-xz-compressed-tar) run als -- "$f" ;;
|
||||
*/x-7z-compressed | */vnd.rar | */x-tar | */zip | */x-java-archive | */x-xz | */gzip) run 7z l "$f" | sed 1,11d ;;
|
||||
*/x-cd-image) run iso-info --no-header -l "$f" ;;
|
||||
*/x-bittorrent) run transmission-show "$f" ;;
|
||||
*/vnd.sun.xml.writer) run odt2txt "$f" ;;
|
||||
*/msword) run catdoc "$f" ;;
|
||||
*/vnd.openxmlformats-officedocument.wordprocessingml.document) run docx2txt <"$f" ;;
|
||||
*/vnd.ms-excel) run ssconvert --export-type=Gnumeric_stf:stf_csv "$f" "fd://1" | text --language=csv ;;
|
||||
*/vnd.openxmlformats-officedocument.spreadsheetml.sheet) run ssconvert --export-type=Gnumeric_stf:stf_csv "$f" "fd://1" | text --language=csv ;;
|
||||
*/x-bzip-compressed-tar | */x-compressed-tar | */x-xz-compressed-tar)
|
||||
run als -- "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/x-7z-compressed | */vnd.rar | */x-tar | */zip | */x-java-archive | */x-xz | */gzip)
|
||||
run 7z l "$f" | sed 1,11d
|
||||
exit 1
|
||||
;;
|
||||
*/x-cd-image)
|
||||
run iso-info --no-header -l "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/x-bittorrent)
|
||||
run transmission-show "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/vnd.sun.xml.writer)
|
||||
run odt2txt "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/msword)
|
||||
run catdoc "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/vnd.openxmlformats-officedocument.wordprocessingml.document)
|
||||
run docx2txt <"$f"
|
||||
exit 1
|
||||
;;
|
||||
*/vnd.ms-excel)
|
||||
run ssconvert --export-type=Gnumeric_stf:stf_csv "$f" "fd://1" | text --language=csv
|
||||
exit 1
|
||||
;;
|
||||
*/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
|
||||
run ssconvert --export-type=Gnumeric_stf:stf_csv "$f" "fd://1" | text --language=csv
|
||||
exit 1
|
||||
;;
|
||||
*/epub+zip)
|
||||
[ ! -f "$CACHE" ] && run epub-thumbnailer "$f" "$CACHE" 1024
|
||||
image "$CACHE"
|
||||
;;
|
||||
*/pgp-encrypted) run gpg -d -- "$f" ;;
|
||||
*/pkix-cert) run openssl x509 -text -noout -in "$f" ;;
|
||||
*/pgp-encrypted)
|
||||
run gpg -d -- "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/pkix-cert)
|
||||
run openssl x509 -text -noout -in "$f"
|
||||
exit 1
|
||||
;;
|
||||
image/svg+xml)
|
||||
[ ! -f "$CACHE" ] && run inkscape --convert-dpi-method=none -o "$CACHE" --export-overwrite -D --export-png-color-mode=RGBA_16 "$f"
|
||||
image "$CACHE"
|
||||
[ ! -f "${CACHE}.png" ] && run inkscape --convert-dpi-method=none -o "${CACHE}.png" --export-overwrite -D --export-png-color-mode=RGBA_16 "$f"
|
||||
image "${CACHE}.png"
|
||||
;;
|
||||
image/*) image ;;
|
||||
video/*) video ;;
|
||||
*opendocument*) run odt2txt "$f" ;;
|
||||
*/markdown) run glow -s "$XDG_CONFIG_HOME/glow/style.json" "$f" --width "$w" ;;
|
||||
*/html) run lynx -dump "$f" ;;
|
||||
*opendocument*)
|
||||
run odt2txt "$f"
|
||||
exit 1
|
||||
;;
|
||||
*/markdown)
|
||||
run glow -s "$XDG_CONFIG_HOME/glow/style.json" "$f" --width "$w"
|
||||
exit 1
|
||||
;;
|
||||
*/html)
|
||||
run lynx -dump "$f"
|
||||
exit 1
|
||||
;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit dcb1db488b5226478642885d5616cceea1e6260e
|
||||
Subproject commit 71dde0f9798908a5b4d120a1e2cedbeb1923a3d9
|
|
@ -119,7 +119,7 @@ export W3M_DIR="$XDG_DATA_HOME/w3m"
|
|||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||
export PYTHONSTARTUP="/etc/python/pythonrc"
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
export XBPS_DISTDIR="$XDG_DOCUMENTS_DIR/dev/desktop/void-packages"
|
||||
export XBPS_DISTDIR="$XDG_DOCUMENTS_DIR/dev/server/void-packages"
|
||||
export ZK_NOTEBOOK_DIR="$XDG_DOCUMENTS_DIR/notes"
|
||||
|
||||
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
firefox 'element.snaile.de' 'discord.com/channels/@me' 'web.telegram.org' 'web.whatsapp.com' 'web.threema.ch'
|
||||
firefox 'mm.tralios.de' 'element.snaile.de' 'discord.com/channels/@me' 'web.telegram.org' 'web.whatsapp.com' 'web.threema.ch'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
firefox 'mm.tralios.de' 'gitlab.tralios.de' 'op.tralios.de/my/page' 'tickets.tralios.de' 'adminfrontend.prod.kc.production.kubernetes.tralios.de' 'prometheus.tralios.de/overview'
|
||||
firefox 'gitlab.tralios.de' 'op.tralios.de/my/page' 'tickets.tralios.de' 'adminfrontend.prod.kc.production.kubernetes.tralios.de' 'prometheus.tralios.de/overview'
|
||||
|
|
Loading…
Reference in New Issue