DNF colors

,

Hi,

I tried to change colors for dnf according to docs

The contents of /etc/dnf/dnf.conf is:

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
fastestmirror=True
max_parallel_downloads=10
keepcache=True
defaultyes=True
color=always
color_list_installed_older=yellow
color_list_installed_newer=bold,yellow
color_list_installed_reinstall=dim,cyan
color_list_installed_running_kernel=bold,underline
color_list_installed_extra=bold,red
color_list_available_upgrade=bold,blue
color_list_available_downgrade=dim,magenta
color_list_available_install=bold,cyan
color_list_available_reinstall=bold,underline,green
color_list_available_running_kernel=bold,underline
color_search_match=bold,magenta
color_update_installed=bg:red
color_update_local=dim,green
color_update_remote=bold,green

But dnf output remains as it was.

Can you please tell what I have missed?

1 Like

I tried a few of these and didn’t have any issues running gnome-console or gnome-terminal with bash as the default shell on F36.
I did have some issues on light themes seeing the dim colors but that may have been old eyes.

color_list_installed_running_kernel=bold,underline
color_list_available_running_kernel=bold,underline

I did not see this in the docs and they do not appear to work

Are you running any different shell or terminal emulator?

3 Likes

(Mostly echo’ing and expanding upon what @grumpey already said here.)

It looks like some of your entries are identical or near identical to the default. That said, you also have some entries here that aren’t in the man page (color_list_available_running_kernel, color_list_installed_running_kernel) .

Depending on your terminal emulator and color profile, dim/bold may or may not have much impact. The terminal emulator and color profile are what is ultimately going to interpret how those values are displayed.

Man Page section
   color  string

          Controls if DNF uses colored output on the command line.  Possible values: "auto", "never", "always". Default is "auto".

   color_list_available_downgrade
          color

          Color of available packages that are older than installed packages.  The option is used during list operations. Default is magenta.

   color_list_available_install
          color

          Color of packages that are available for installation and none of their versions in installed.  The option is used during list operations. Default is bold,cyan.

   color_list_available_reinstall
          color

          Color of available packages that are identical to installed versions and are available for reinstalls. Default is bold,underline,green.  The option is used during list operations.

   color_list_available_upgrade
          color

          Color of available packages that are newer than installed packages. Default is bold,blue.  The option is used during list operations.

   color_list_installed_extra
          color

          Color of installed packages that do not have any version among available packages.  The option is used during list operations. Default is bold,red.

   color_list_installed_newer
          color

          Color of installed packages that are newer than any version among available packages.  The option is used during list operations. Default is bold,yellow.

   color_list_installed_older
          color

          Color of installed packages that are older than any version among available packages.  The option is used during list operations. Default is yellow.

   color_list_installed_reinstall
          color

          Color of installed packages that are among available packages and can be reinstalled.  The option is used during list operations. Default is cyan.

   color_search_match
          color

          Color of patterns matched in search output. Default is bold,magenta.

   color_update_installed
          color

          Color of removed packages. Default is red.  This option is used during displaying transactions.

   color_update_local
          color

          Color of local packages that are installed from the @commandline repository.  This option is used during displaying transactions. Default is green.

   color_update_remote
          color

          Color of packages that are installed/upgraded/downgraded from remote repositories.  This option is used during displaying transactions. Default is bold,green.
3 Likes

Thanks @grumpey, @vwbusguy. It was late, I messed with the wrong docs and copied extra stuff :grinning:

BTW, is it possible to configure colors for the version numbers like here in dnf?

Off the top of my head I don’t know of one.