From b03cfe1a6f8a492bc271dda00c9873417c6650ad Mon Sep 17 00:00:00 2001 From: Tucker Johnson Date: Sun, 3 Aug 2025 10:56:20 -0400 Subject: [PATCH] baca --- .gitignore | 3 +++ baca/config.ini | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ lf/lfrc | 3 ++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 baca/config.ini diff --git a/.gitignore b/.gitignore index 0d47fec..bd34aed 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ !newsboat/config !newsboat/urls +!baca/ +!baca/config.ini + !shell/ !shell/aliasrc !shell/bm-dirs diff --git a/baca/config.ini b/baca/config.ini new file mode 100644 index 0000000..920f7e5 --- /dev/null +++ b/baca/config.ini @@ -0,0 +1,51 @@ +[General] +# pick your favorite image viewer +PreferredImageViewer = auto + +# int or css value string like 90%% +# (escape percent with double percent %%) +MaxTextWidth = 90%% + +# 'justify', 'center', 'left', 'right' +TextJustification = justify + +# currently using pretty=yes is slow +# and taking huge amount of memory +Pretty = no + +PageScrollDuration = 0.2 + +# either show image as ansi image +# or text 'IMAGE' as a placehoder +# (showing ansi image will affect +# performance & resource usage) +ShowImageAsANSI = yes + +[Color Dark] +Background = #1e1e1e +Foreground = #f5f5f5 +Accent = #0178d4 + +[Color Light] +Background = #f5f5f5 +Foreground = #1e1e1e +Accent = #0178d4 + +[Keymaps] +ToggleLightDark = c +ScrollDown = down,j +ScrollUp = up,k +PageDown = ctrl+f,pagedown,l,space +PageUp = ctrl+b,pageup,h +Home = home,g +End = end,G +OpenToc = tab +OpenMetadata = M +OpenHelp = f1 +SearchForward = slash +SearchBackward = question_mark +NextMatch = n +PreviousMatch = N +Confirm = enter +CloseOrQuit = q,escape +Screenshot = f12 diff --git a/lf/lfrc b/lf/lfrc index 59feb50..937c10b 100644 --- a/lf/lfrc +++ b/lf/lfrc @@ -26,7 +26,8 @@ cmd open ${{ ;; audio/*|video/x-ms-asf) mpv --audio-display=no $f ;; video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; - application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;; + application/pdf) setsid -f zathura $fx >/dev/null 2>&1 ;; + application/vnd.djvu|application/epub*) baca $fx ;; application/pgp-encrypted) $EDITOR $fx ;; application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f libreoffice $fx >/dev/null 2>&1 ;; application/octet-stream) case ${f##*.} in -- 2.39.5