diff --git a/.config/lf/scope b/.config/lf/scope index cc556697..1e688973 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -49,6 +49,14 @@ case "$(file --dereference --brief --mime-type -- "$1")" in [ ! -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" ;; diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 deleted file mode 120000 index 20593d73..00000000 --- a/.gtkrc-2.0 +++ /dev/null @@ -1 +0,0 @@ -.config/gtk-2.0/gtkrc-2.0 \ No newline at end of file diff --git a/.local/bin/mounter b/.local/bin/mounter index b532e08f..128f1036 100755 --- a/.local/bin/mounter +++ b/.local/bin/mounter @@ -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." ;; diff --git a/.local/share/bg b/.local/share/bg deleted file mode 120000 index b41641dc..00000000 --- a/.local/share/bg +++ /dev/null @@ -1 +0,0 @@ -thiemeyer_road_to_samarkand.jpg \ No newline at end of file diff --git a/.xprofile b/.xprofile deleted file mode 120000 index 61f87a7b..00000000 --- a/.xprofile +++ /dev/null @@ -1 +0,0 @@ -.config/x11/xprofile \ No newline at end of file diff --git a/.zprofile b/.zprofile deleted file mode 120000 index 8486fcaf..00000000 --- a/.zprofile +++ /dev/null @@ -1 +0,0 @@ -.config/shell/profile \ No newline at end of file