Colorizing `pamac` on the CLI

Is there a way to colorize pamac on the CLI like it can be done with pacman?

Open a feature request here: Issues · Applications / pamac · GitLab

Colorizing pamac like pacman on GitLab

@chandra you may see my try [Merge Request] Colorize pamac search output (#1064) · Issues · Applications / pamac · GitLab :wink:

I have cloned the GitLab repository and applied the patch.

I am unfamiliar with meson but modified the commands in README to generate a local binary.

In src:

mkdir ../usr ../etc
mkdir builddir && cd builddir
meson setup --prefix=../../usr --sysconfdir=../../etc --buildtype=release

and got this message:

The Meson build system
Version: 0.58.1
Source dir: /home/chandra/my-pamac/src
Build dir: /home/chandra/my-pamac/src/builddir
Build type: native build

ERROR: First statement must be a call to project

Please help me generate a local binary for testing, perhaps by posting a suitably modified README.

Thank you.

You do it wrong, you should’t be in pamac/src/builddir directory but in pamac/builddir when execute meson setup. Also you should switch to testing branch – to setup and build you need libpamac >= 11 (and maybe other dependencies, meson tell you if something is missing). So full setup (I recommend testing in virtualbox if you are afraid with messing your system) is something like:

sudo pacman-mirrors --api --set-branch testing
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
git clone
cd pamac
git am 0001-colorize-pamac-search.patch
mkdir builddir && cd builddir
meson setup --prefix=/usr --sysconfdir=/etc --buildtype=release
meson compile
sudo meson install # optional step

meson install is optional, this will replace you current pamac version from repositories, you may not want this. Compiled pamac binaries you find in builddir/src, you can execute those binaries instead.

I installed meson and vala on another machine and successfully followed your guide step-by-step from changing the repo branch to system-wide installation of the patched pamac.

pamac --version gives Pamac 10.1.3.

I then tried pacman -Ss kate on my regular machine and got the output shown in

With pamac search kate on my second machine (with the testing branch and patched pamac installed) I got the output shown in

Since there is no colour in the latter, what am I doing wrong?

Thanks for your patient and clear help.

See help :wink: I added --color and -c flags. I don’t know how to integrate this with config file – at least now – it’s task for time when pamac will be fully colorized


pamac search --color kate now gives the output shown in

This is excellent!

Thank you!

Only one suggestion on improving ease of use, but unrelated to colour. It will be better if the output could be arranged more compactly on a single line to be easier on the eye. Right now, with output stretched out on two, long lines, it is harder to extract the information visually without skipping lines. Perhaps I have missed an option. :wink:


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.