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!
|
||||
# highlight --out-format=xterm256 -s zmrok "$path" | head -n $maxln
|
||||
success && exit 5 || exit 2;;
|
||||
# Ascii-previews of images:
|
||||
|
||||
# CUSTOM
|
||||
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:
|
||||
video/* | audio/*)
|
||||
have exiftool && exiftool "$path" && exit 5
|
||||
|
|
|
@ -920,25 +920,19 @@ formatc()
|
|||
|
||||
## TeXlive
|
||||
if [ -d "/usr/local/texlive" ]; then
|
||||
|
||||
## WARNING: it is important to set umask properly, otherwise users might
|
||||
## not have authorization to use the packages.
|
||||
|
||||
## TODO: It is dirty to invoke a subshell several times.
|
||||
## Would be better to pass one parameter, then to tokenize it.
|
||||
## This is bad pratice to write args without double quotes, but since we
|
||||
## are sure there is no space in TeX Live packages, it is OK here.
|
||||
|
||||
tli ()
|
||||
{
|
||||
for i ; do
|
||||
sudo sh -c 'umask 022 && tlmgr install "$0"' "$i"
|
||||
done
|
||||
sudo sh -c 'umask 022 && tlmgr install $0 $@' "$@"
|
||||
}
|
||||
|
||||
tlr ()
|
||||
{
|
||||
for i ; do
|
||||
sudo sh -c 'umask 022 && tlmgr remove "$0"' "$i"
|
||||
done
|
||||
sudo sh -c 'umask 022 && tlmgr remove $0 $@' "$@"
|
||||
}
|
||||
|
||||
fi
|
||||
|
|
|
@ -45,6 +45,7 @@ fi
|
|||
|
||||
## Terminal
|
||||
## 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.
|
||||
if [ ! "$OSTYPE" = "linux-gnu" ] && [[ "$TERM" = *rxvt* ]]; then
|
||||
export TERM="rxvt-unicode-256color"
|
||||
|
|
Loading…
Reference in New Issue