diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-23 11:31:35 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-23 11:31:35 +0900 |
| commit | 709c8bbbfae795f083b14e06c9674a6754ea404d (patch) | |
| tree | 145c442d7bea65b7602271d5fa3265ff0a279afb /ar/.config/lf | |
| parent | 5328e20a7ee864dd28f68df0ced4c3ce3f0fd5c7 (diff) | |
modified lf/lfrc, modified lf/scope, modified shell/bm-dirs, modified shell/bm-files, created television/
Diffstat (limited to 'ar/.config/lf')
| -rw-r--r-- | ar/.config/lf/lfrc | 3 | ||||
| -rwxr-xr-x | ar/.config/lf/scope | 30 |
2 files changed, 28 insertions, 5 deletions
diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc index 9425ee2..99150ee 100644 --- a/ar/.config/lf/lfrc +++ b/ar/.config/lf/lfrc @@ -324,8 +324,7 @@ cmd open ${{ ;; application/epub*|application/pdf|application/postscript|application/vnd.djvu|image/vnd.djvu) setsid -f zathura $fx >/dev/null 2>&1 ;; application/pgp-encrypted) $EDITOR $fx ;; - application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f firefox $fx >/dev/null 2>&1 ;; - application/x-hwp|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.openxmlformats-officedocument.wordprocessingml.document) setsid -f libreoffice $fx >/dev/null 2>&1 ;; + application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database|application/x-hwp|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.openxmlformats-officedocument.wordprocessingml.document) setsid -f libreoffice $fx >/dev/null 2>&1 ;; audio/*|video/x-ms-asf) setsid -f mpv --volume=50 --x11-name=music --force-window=yes --audio-display=embedded-first --really-quiet -- "$f" </dev/null >/dev/null 2>&1 ; lf -remote "send $id redraw" ;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; image/svg+xml) display -- $f ;; diff --git a/ar/.config/lf/scope b/ar/.config/lf/scope index 9d2f876..73475a6 100755 --- a/ar/.config/lf/scope +++ b/ar/.config/lf/scope @@ -65,7 +65,8 @@ video/* | application/octet-stream | application/vnd.rn-realmedia) ;; application/vnd.openxmlformats-officedocument.presentationml.presentation) CACHE="$(thumb_cache "$1")" - [ ! -f "$CACHE.jpg" ] && unoconv -f jpg -o "$CACHE.jpg" "$1" + [ ! -f "$CACHE.jpg" ] && libreoffice --headless --convert-to jpg --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \ + && mv "$(dirname "$CACHE")/$(basename "${1%.*}").jpg" "$CACHE.jpg" image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;; application/x-hwp) @@ -81,12 +82,35 @@ application/x-hwp) ;; applicationg/gzip) zcat -- "$1" ;; application/*zip) atool --list -- "$1" ;; +application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template) + CACHE="$(thumb_cache "$1")" + [ ! -f "$CACHE.md" ] && pandoc "$1" -t markdown -o "$CACHE.md" + bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.md" + ;; +application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template) + CACHE="$(thumb_cache "$1")" + [ ! -f "$CACHE.csv" ] && libreoffice --headless --convert-to csv --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \ + && mv "$(dirname "$CACHE")/$(basename "${1%.*}").csv" "$CACHE.csv" + bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.csv" + ;; +application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template) + CACHE="$(thumb_cache "$1")" + [ ! -f "$CACHE.jpg" ] && libreoffice --headless --convert-to jpg --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \ + && mv "$(dirname "$CACHE")/$(basename "${1%.*}").jpg" "$CACHE.jpg" + image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" + ;; *opendocument*) odt2txt "$1" ;; application/pgp-encrypted) gpg -d -- "$1" ;; application/vnd.openxmlformats-officedocument.wordprocessingml.document) CACHE="$(thumb_cache "$1")" - [ ! -f "$CACHE.txt" ] && pandoc "$1" -t plain -o "$CACHE.txt" - bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.txt" + [ ! -f "$CACHE.md" ] && pandoc "$1" -t markdown -o "$CACHE.md" + bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.md" + ;; +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/vnd.ms-excel) + CACHE="$(thumb_cache "$1")" + [ ! -f "$CACHE.csv" ] && libreoffice --headless --convert-to csv --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \ + && mv "$(dirname "$CACHE")/$(basename "${1%.*}").csv" "$CACHE.csv" + bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.csv" ;; esac exit 1 |
