diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 14:27:58 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 14:28:30 +0530 |
| commit | bde84587b2a408970086f4c708ac9a629abfa554 (patch) | |
| tree | fc48afc6d44159554d6f18c6fce7ddfccecc364d /modules/scripts/file-preview.sh | |
| parent | 4124a5ae231a585b945c9547a3ab0c37a4eba7e3 (diff) | |
| download | home-manager-config-bde84587b2a408970086f4c708ac9a629abfa554.tar.gz home-manager-config-bde84587b2a408970086f4c708ac9a629abfa554.zip | |
feat: switch launcher to dex, add vi-mode and kitty nav, enable ouch unfree
Rewrite fzf-launcher to use dex via setsid instead of parsing Exec=
lines
Add vi-mode (bindkey -v, KEYTIMEOUT=1) to zsh
Add Ctrl+click link handling and Ctrl+Shift+h/j/k/l window nav to kitty
Switch i3 terminal key from $mod+t to $mod+Return
Enable unRAR support in ouch (override enableUnfree)
Fix epub cover extraction (decompress full archive, use find)
Remove neomutt dd/gT keybindings
Fix missing $TITLE quoting in neomutt-sync
Add findutils and dex to script deps
Diffstat (limited to 'modules/scripts/file-preview.sh')
| -rw-r--r-- | modules/scripts/file-preview.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/scripts/file-preview.sh b/modules/scripts/file-preview.sh index 047252d..7712754 100644 --- a/modules/scripts/file-preview.sh +++ b/modules/scripts/file-preview.sh @@ -93,8 +93,10 @@ case "$MIMETYPE" in application/epub+zip|application/x-mobipocket-ebook) TMP_IMG="$TMP_DIR/epub-${INODE}.png" if [ ! -f "$TMP_IMG" ]; then - ouch decompress "$FILE_PATH" --limit "*/cover*.jpg" --dir "$TMP_DIR" >/dev/null 2>&1 - mv "$TMP_DIR"/cover*.jpg "$TMP_IMG" 2>/dev/null + EPUB_DIR="$TMP_DIR/epub-${INODE}" + ouch decompress --yes --dir "$EPUB_DIR" "$FILE_PATH" >/dev/null 2>&1 + COVER=$(find "$EPUB_DIR" -type f \( -iname 'cover*.jpg' -o -iname 'cover*.jpeg' -o -iname 'cover*.png' \) -print -quit) + [ -n "$COVER" ] && cp "$COVER" "$TMP_IMG" fi [ -s "$TMP_IMG" ] && render_image "$TMP_IMG" ;; |
