mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Merge a984022d372c72f15c2d4446f0be887f297932ab into 1f7376c805cb57daef05713412f8e562141eead8
This commit is contained in:
commit
d52eb228ba
@ -50,6 +50,14 @@ image/svg+xml)
|
||||
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
*officedocument* | application/msword)
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE.jpg" ] && libreoffice --convert-to jpg "$1" --outdir "$CACHE" >/dev/null
|
||||
# 将绝对路径转换为文件名
|
||||
tmpfile=$(echo "$1"| rev | cut -f 1 -d"/" | rev | sed -r 's/.[^\.]*$//')
|
||||
mv $CACHE/$tmpfile.jpg $CACHE.jpg && rmdir $CACHE
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
application/*zip) atool --list -- "$1" ;;
|
||||
*opendocument*) odt2txt "$1" ;;
|
||||
application/pgp-encrypted) gpg -d -- "$1" ;;
|
||||
|
||||
@ -1 +0,0 @@
|
||||
.config/gtk-2.0/gtkrc-2.0
|
||||
@ -80,7 +80,8 @@ case "$chosen" in
|
||||
chosen="${chosen%% *}"
|
||||
chosen="${chosen:1}" # This is a bashism.
|
||||
attemptmount || getmount
|
||||
sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
|
||||
# ext4 does not support uid,gid
|
||||
[ $(lsblk -npro "fstype" $chosen) == ext[2-4] ] && sudo -A mount "$chosen" "$mp" -o user="$USER",rw || sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
|
||||
notify-send "💾Drive Mounted." "$chosen mounted to $mp."
|
||||
;;
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
thiemeyer_road_to_samarkand.jpg
|
||||
Loading…
x
Reference in New Issue
Block a user