lf has images again!
This commit is contained in:
parent
8aa99de402
commit
b8d085f2b5
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
if [ -n "$FIFO_UEBERZUG" ]; then
|
||||
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||
fi
|
||||
@ -2,21 +2,6 @@
|
||||
|
||||
# Luke's lf settings
|
||||
|
||||
|
||||
# Note on Image Previews
|
||||
# For those wanting image previews, like this system, there are four steps to
|
||||
# set it up. These are done automatically for LARBS users, but I will state
|
||||
# them here for others doing it manually.
|
||||
#
|
||||
# 1. ueberzug must be installed.
|
||||
# 2. The scope file (~/.config/lf/scope for me), must have a command similar to
|
||||
# mine to generate ueberzug images.
|
||||
# 3. A `set cleaner` line as below is a cleaner script.
|
||||
# 4. lf should be started through a wrapper script (I have this installed through my scripts)
|
||||
# that creates the environment for ueberzug. This command can be be aliased
|
||||
# in your shellrc (`alias lf="lfub") or if set to a binding, should be
|
||||
# called directly instead of normal lf.
|
||||
|
||||
# Basic vars
|
||||
set shellopts '-eu'
|
||||
set ifs "\n"
|
||||
@ -25,8 +10,10 @@ set icons
|
||||
set ignorecase
|
||||
set period 1
|
||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||
set cleaner '~/.config/lf/cleaner'
|
||||
set previewer '~/.config/lf/scope'
|
||||
set previewer ctpv
|
||||
set cleaner ctpvclear
|
||||
&ctpv -s $id
|
||||
&ctpvquit $id
|
||||
|
||||
# cmds/functions
|
||||
cmd open ${{
|
||||
|
||||
@ -39,7 +39,6 @@ alias \
|
||||
z="zathura"
|
||||
|
||||
alias \
|
||||
lf="lfub" \
|
||||
magit="nvim -c MagitOnly" \
|
||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is a wrapper script for lb that allows it to create image previews with
|
||||
# ueberzug. This works in concert with the lf configuration file and the
|
||||
# lf-cleaner script.
|
||||
|
||||
set -e
|
||||
|
||||
cleanup() {
|
||||
exec 3>&-
|
||||
rm "$FIFO_UEBERZUG"
|
||||
}
|
||||
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
lf "$@"
|
||||
else
|
||||
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
|
||||
mkfifo "$FIFO_UEBERZUG"
|
||||
ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
|
||||
exec 3>"$FIFO_UEBERZUG"
|
||||
trap cleanup HUP INT QUIT TERM PWR EXIT
|
||||
lf "$@" 3>&-
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user