mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Compare commits
7 Commits
d4924c6ab8
...
80cca23d36
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80cca23d36 | ||
|
|
b8cd0ab495 | ||
|
|
c550a7c6e5 | ||
|
|
a984022d37 | ||
|
|
a8447849ea | ||
|
|
54f4b8718d | ||
|
|
9c26507b01 |
@ -49,6 +49,14 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
|
|||||||
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
|
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
|
||||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
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" ;;
|
application/*zip) atool --list -- "$1" ;;
|
||||||
*opendocument*) odt2txt "$1" ;;
|
*opendocument*) odt2txt "$1" ;;
|
||||||
application/pgp-encrypted) gpg -d -- "$1" ;;
|
application/pgp-encrypted) gpg -d -- "$1" ;;
|
||||||
|
|||||||
@ -31,3 +31,4 @@ progressbar_elapsed_color = blue:b
|
|||||||
statusbar_color = red
|
statusbar_color = red
|
||||||
statusbar_time_color = cyan:b
|
statusbar_time_color = cyan:b
|
||||||
execute_on_song_change="pkill -RTMIN+11 dwmblocks"
|
execute_on_song_change="pkill -RTMIN+11 dwmblocks"
|
||||||
|
execute_on_player_state_change="pkill -RTMIN+11 dwmblocks"
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
.config/gtk-2.0/gtkrc-2.0
|
|
||||||
@ -12,7 +12,7 @@ inputaudio="$1"
|
|||||||
ext="${1##*.}"
|
ext="${1##*.}"
|
||||||
|
|
||||||
# Get a safe file name from the book.
|
# Get a safe file name from the book.
|
||||||
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
escbook="$(echo "$booktitle" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
|
|
||||||
! mkdir -p "$escbook" &&
|
! mkdir -p "$escbook" &&
|
||||||
echo "Do you have write access in this directory?" &&
|
echo "Do you have write access in this directory?" &&
|
||||||
@ -31,7 +31,7 @@ do
|
|||||||
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
|
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
|
||||||
fi
|
fi
|
||||||
title="$(echo "$x" | cut -d' ' -f2-)"
|
title="$(echo "$x" | cut -d' ' -f2-)"
|
||||||
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
esctitle="$(echo "$title" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
track="$((track+1))"
|
track="$((track+1))"
|
||||||
start="$end"
|
start="$end"
|
||||||
done < "$2"
|
done < "$2"
|
||||||
|
|||||||
@ -80,7 +80,8 @@ case "$chosen" in
|
|||||||
chosen="${chosen%% *}"
|
chosen="${chosen%% *}"
|
||||||
chosen="${chosen:1}" # This is a bashism.
|
chosen="${chosen:1}" # This is a bashism.
|
||||||
attemptmount || getmount
|
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."
|
notify-send "💾Drive Mounted." "$chosen mounted to $mp."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}"
|
|||||||
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
|
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
|
||||||
|
|
||||||
# Get a weather report from 'wttr.in' and save it locally.
|
# Get a weather report from 'wttr.in' and save it locally.
|
||||||
getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
|
getforecast() { timeout --signal=1 2s curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
|
||||||
|
|
||||||
# Forecast should be updated only once a day.
|
# Forecast should be updated only once a day.
|
||||||
checkforecast() {
|
checkforecast() {
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
thiemeyer_road_to_samarkand.jpg
|
|
||||||
Loading…
x
Reference in New Issue
Block a user