From 3639976a65e7994fba6efb4051f909aa30549c3a Mon Sep 17 00:00:00 2001 From: "yuri@hx90" Date: Wed, 12 Jun 2024 14:31:08 -0400 Subject: [PATCH] Update readme and some cleanup --- README.md | 69 +++++++++++++++++++++++++++++-------------------------- pacbro.pl | 16 +++++-------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index fc37dd6..fe66ecb 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,7 @@ ABOUT of "pacman"; AUR web API is used to get package information from AUR repo if launched with the "--aur" option. - The top panel displays one of the following: - * package information fetched with pacman -Qi|-Si - * selected package file contents or type + The top panel displays package information. The bottom panels display: * related package lists: dependencies, dependants, conflicts etc; @@ -52,8 +50,14 @@ ABOUT This program does not have package management capabilities (not yet) and can run as any unprivileged user. - Fun fact: it was tested to fit and run in 80x24 green text - terminal, although I hope you have a better screen. + This program extensively relies upon "tmux" multi-panel layout + and "fzf" list management. A small subset of keybindings were + redefined, but the rest of tmux keys should work as locally + configured; those having experience working in tmux should find + themselves in a familiar environment. + + Fun fact: pacbro.pl was tested to fit and run in 80x24 green + text terminal, although I hope you have a bigger screen. DEPENDENCIES @@ -68,41 +72,42 @@ DEPENDENCIES AUR - For AUR packages to be loaded, "--aur" argument passed to this - program. + For AUR packages to be loaded, "--aur" argument must passed to this + program. Without "--aur" the packages installed from it will be + classified as in "~foreign" repository. It is impractical to load details of all packages in AUR, - there are just too many of them. This means search by package - details doesn't work for not installed AUR packages. - - For the same reason auto display of package details is disabled, - when AUR listing is on. You need to explicitly hit on - the package in order to fetch package details from the web. + there are just too many of them. This means context search by + package details (e.g. by file name or package description) doesn't + work for AUR packages, unless they are installed. KEYBINDINGS Main screen keebindings - Ctrl+c Exit pacbro - Alt+q Exit pacbro - Alt+Left Back in package view history - Alt+Right Forward in package view history - Ctrl+Left Focus pane 🠜 - Ctrl+Up Focus pane 🠝 - Ctrl+Down Focus pane 🠟 - Ctrl+Right Focus pane 🠞 - Alt+v Detail View/Layout - Alt+r Repo filter - Alt+i Installed status filter - Alt+o Outdated status filter - Alt+f Search filenames - Alt+d Search package details - Alt+m Main Menu - Alt+k Keyboard Shortcuts - Alt+? Help / About + Ctrl+c Exit pacbro + Alt+q Exit pacbro + Alt+Left Back in package view history + Alt+Right Forward in package view history + Ctrl+Left Focus pane 🠜 + Ctrl+Up Focus pane 🠝 + Ctrl+Down Focus pane 🠟 + Ctrl+Right Focus pane 🠞 + Alt+x Tag/Mark current package (toggle) + Alt+v Detail View/Layout (Alt+v) + Alt+r Repo filter (Alt+r) + Alt+i Installed status filter (Alt+i) + Alt+o Outdated status filter (Alt+o) + Alt+f Search filenames (Alt+f) + Alt+d Search package details (Alt+d) + Alt+t Toggle "Show Tagged" packages (Alt+t) + Alt+m Main Menu (Alt+m) + Alt+k Keyboard Shortcuts (Alt+k) + Alt+? Help / About (Alt+?) In list/selection popup dialogs: - Alt+q Exit list popup - Ctrl+a Select all (multiselect dialogs) + Alt+q Exit list popup + Ctrl+a Select all in multiselect dialogs (fzf) + Tab Toggle select in multiselect lists (fzf) diff --git a/pacbro.pl b/pacbro.pl index 721e558..a76eaef 100755 --- a/pacbro.pl +++ b/pacbro.pl @@ -572,12 +572,8 @@ sub pac_db_load_full { } sub pac_props_parse { - my ($rec_text) = @_; - my $pac_info = {}; # parsed map and some derived value - while ($rec_text =~ m/^(\w+(?:[ \-]\w+)*)[ ]*\:[ ]*(\S.*?)(?=\v[\w\v]|\v*\z)/mgs) { - $pac_info->{$1} = $2; - } - return $pac_info; + my ($rec_text) = @_; # parsed map + return {($rec_text =~ m/^(\w+(?:[ \-]\w+)*)[ ]*\:[ ]*(\S.*?)(?=\v[\w\v]|\v*\z)/mgs)}; } sub pac_list_get { @@ -1005,7 +1001,7 @@ sub pac_dep_cyc_exam { sub keybindings_text { my ($tmux) = @_; - my $key_list_text = join("\n", map {key_label($_->{key}) . "\t$_->{label}"} @$tmux_key_list); + my $key_list_text = join("\n", map {substr(key_label($_->{key}.(' 'x10)), 0, 12) . $_->{label}} @$tmux_key_list); return <<"TEXT"; Main screen keebindings @@ -1013,9 +1009,9 @@ sub keybindings_text { In list/selection popup dialogs: -Alt+q Exit list popup -Ctrl+a Select all in multiselect dialogs (fzf) -Tab Toggle select in multiselect lists (fzf) +Alt+q Exit list popup +Ctrl+a Select all in multiselect dialogs (fzf) +Tab Toggle select in multiselect lists (fzf) TEXT }