Compare commits

...

6 Commits

Author SHA1 Message Date
Jane42070
ef4785d0ec
Merge a984022d372c72f15c2d4446f0be887f297932ab into 708d6c67317ca90138681d4a7892cc5db2e092cc 2023-10-11 15:43:56 -07:00
appeasementPolitik
708d6c6731
Change remaining tremc entry in script to stig (#1364) 2023-10-04 20:01:05 +00:00
Jane42070
a984022d37 update 2023-08-14 20:32:00 +08:00
Jane42070
a8447849ea add *officedocument* application/msword preview support 2023-03-30 20:25:34 +08:00
Jane42070
54f4b8718d mounter mount ext* filesystem param does not support uid,gid fix 2023-03-25 20:12:11 +08:00
Jane42070
9c26507b01 add msdocx xlsx like doc preview support 2023-03-25 19:04:08 +08:00
7 changed files with 12 additions and 7 deletions

View File

@ -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" ;;

View File

@ -1 +0,0 @@
.config/gtk-2.0/gtkrc-2.0

View File

@ -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."
;;

View File

@ -11,9 +11,9 @@ transmission-remote -l | grep % |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e tremc ;;
1) setsid -f "$TERMINAL" -e stig ;;
2) td-toggle ;;
3) notify-send "🌱 Torrent module" "\- Left click to open tremc.
3) notify-send "🌱 Torrent module" "\- Left click to open stig.
- Middle click to toggle transmission.
- Shift click to edit script.
Module shows number of torrents:

View File

@ -1 +0,0 @@
thiemeyer_road_to_samarkand.jpg

View File

@ -1 +0,0 @@
.config/x11/xprofile

View File

@ -1 +0,0 @@
.config/shell/profile