Ranger: replace image preview by textual details (mediainfo).
Shell: TeX Live package installation and removal optimized.master
parent
08d8ceb98d
commit
38f35e9472
|
@ -82,9 +82,18 @@ case "$mimetype" in
|
||||||
# FIXME: does not work!
|
# FIXME: does not work!
|
||||||
# highlight --out-format=xterm256 -s zmrok "$path" | head -n $maxln
|
# highlight --out-format=xterm256 -s zmrok "$path" | head -n $maxln
|
||||||
success && exit 5 || exit 2;;
|
success && exit 5 || exit 2;;
|
||||||
# Ascii-previews of images:
|
|
||||||
|
# CUSTOM
|
||||||
image/*)
|
image/*)
|
||||||
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
|
## Ascii-previews of images:
|
||||||
|
# img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
|
||||||
|
## Use sed to remove spaces so the output fits into the narrow window
|
||||||
|
if have mediainfo; then
|
||||||
|
mediainfo "$path" | sed 's/ \+:/: /;'
|
||||||
|
success && exit 5
|
||||||
|
fi
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
# Display information about media files:
|
# Display information about media files:
|
||||||
video/* | audio/*)
|
video/* | audio/*)
|
||||||
have exiftool && exiftool "$path" && exit 5
|
have exiftool && exiftool "$path" && exit 5
|
||||||
|
|
|
@ -920,25 +920,19 @@ formatc()
|
||||||
|
|
||||||
## TeXlive
|
## TeXlive
|
||||||
if [ -d "/usr/local/texlive" ]; then
|
if [ -d "/usr/local/texlive" ]; then
|
||||||
|
|
||||||
## WARNING: it is important to set umask properly, otherwise users might
|
## WARNING: it is important to set umask properly, otherwise users might
|
||||||
## not have authorization to use the packages.
|
## not have authorization to use the packages.
|
||||||
|
|
||||||
## TODO: It is dirty to invoke a subshell several times.
|
## This is bad pratice to write args without double quotes, but since we
|
||||||
## Would be better to pass one parameter, then to tokenize it.
|
## are sure there is no space in TeX Live packages, it is OK here.
|
||||||
|
|
||||||
tli ()
|
tli ()
|
||||||
{
|
{
|
||||||
for i ; do
|
sudo sh -c 'umask 022 && tlmgr install $0 $@' "$@"
|
||||||
sudo sh -c 'umask 022 && tlmgr install "$0"' "$i"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tlr ()
|
tlr ()
|
||||||
{
|
{
|
||||||
for i ; do
|
sudo sh -c 'umask 022 && tlmgr remove $0 $@' "$@"
|
||||||
sudo sh -c 'umask 022 && tlmgr remove "$0"' "$i"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -45,6 +45,7 @@ fi
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
## WARNING: this is always a bad idea!
|
## WARNING: this is always a bad idea!
|
||||||
|
## FreeBSD urxvt $TERM variable is not set properly for some reasons.
|
||||||
## TODO: check how to do this properly.
|
## TODO: check how to do this properly.
|
||||||
if [ ! "$OSTYPE" = "linux-gnu" ] && [[ "$TERM" = *rxvt* ]]; then
|
if [ ! "$OSTYPE" = "linux-gnu" ] && [[ "$TERM" = *rxvt* ]]; then
|
||||||
export TERM="rxvt-unicode-256color"
|
export TERM="rxvt-unicode-256color"
|
||||||
|
|
Loading…
Reference in New Issue