summaryrefslogtreecommitdiff
path: root/ar/.local
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 01:37:44 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 01:37:44 +0900
commit41c1df54d4bbe3e07c16ed0db9821622cc13f5e4 (patch)
treedb20c2cfc9d01c70f999785fafb0852c0d7a7635 /ar/.local
parentbdb59276699429f4044f6abf522b610f1f6b95e7 (diff)
modified lf/cleaner, modified lf/scope, modified bin/fzffiles, modified bin/lfub, deleted bin/unewsboat
Diffstat (limited to 'ar/.local')
-rwxr-xr-xar/.local/bin/fzffiles9
-rwxr-xr-xar/.local/bin/lfub12
-rwxr-xr-xar/.local/bin/unewsboat16
3 files changed, 14 insertions, 23 deletions
diff --git a/ar/.local/bin/fzffiles b/ar/.local/bin/fzffiles
index 5dd97bc..d092596 100755
--- a/ar/.local/bin/fzffiles
+++ b/ar/.local/bin/fzffiles
@@ -10,7 +10,14 @@ IFS='
# Get the list of selected files with key bindings for specific paths
files=$(fzf-tmux \
--header "^a pwd ^b public ^d .dotfiles ^f configs ^g git ^h home ^k desktop ^r scripts ^s suckless ^u staged files ^v private ^/ help" \
- --preview 'if [ -d {} ]; then exa --color=always --long --all --header --icons --git {}; elif [ -L {} ]; then file -h {}; else bat --color=always --style=header,grid --line-range=:500 {}; fi' \
+ --preview "target=\$(readlink -f {}) &&
+ if [ -d \"\$target\" ]; then
+ exa --color=always --long --all --header --icons --git \"\$target\"
+ elif [ -f \"\$target\" ]; then
+ bat --color=always --style=header,grid --line-range=:500 \"\$target\"
+ else
+ file -h {}
+ fi" \
--reverse \
--query="$1" \
--multi \
diff --git a/ar/.local/bin/lfub b/ar/.local/bin/lfub
index b743989..c999412 100755
--- a/ar/.local/bin/lfub
+++ b/ar/.local/bin/lfub
@@ -1,24 +1,24 @@
#!/bin/sh
# This is a wrapper script for lf that allows it to create image previews with
-# ueberzug. This works in concert with the lf configuration file and the
+# ueberzugpp. This works in concert with the lf configuration file and the
# lf-cleaner script.
set -e
cleanup() {
exec 3>&-
- rm "$FIFO_UEBERZUG"
+ rm "$FIFO_UEBERZUGPP"
}
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 -p json <"$FIFO_UEBERZUG" &
- exec 3>"$FIFO_UEBERZUG"
+ export FIFO_UEBERZUGPP="$HOME/.cache/lf/ueberzugpp-$$"
+ mkfifo "$FIFO_UEBERZUGPP"
+ ueberzugpp layer -s -p json <"$FIFO_UEBERZUGPP" &
+ exec 3>"$FIFO_UEBERZUGPP"
trap cleanup HUP INT QUIT TERM PWR EXIT
lf "$@" 3>&-
fi
diff --git a/ar/.local/bin/unewsboat b/ar/.local/bin/unewsboat
deleted file mode 100755
index 547fae2..0000000
--- a/ar/.local/bin/unewsboat
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-export FIFO_UEBERZUG="/tmp/vifm-ueberzug-${PPID}"
-
-function cleanup {
- rm "$FIFO_UEBERZUG" 2>/dev/null
- pkill -P $$ 2>/dev/null
-}
-
-rm "$FIFO_UEBERZUG" 2>/dev/null
-mkfifo "$FIFO_UEBERZUG"
-trap cleanup EXIT
-tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser bash &
-
-newsboat "$@"
-cleanup