ansible-role-customize-gnome icon indicating copy to clipboard operation
ansible-role-customize-gnome copied to clipboard

Install fonts for user rather than system-wide?

Open grdryn opened this issue 2 years ago • 2 comments

Hi again @PeterMosmans! :wave: I had a thought while trying out the gnome_fonts variable here for the first time:

  1. The gnome_extensions, gnome_dconf, and gnome_gsettings variables lead to changes for the user, rather than system-wide.
  2. The gnome_files variable seems agnostic—it could have a user or system dest set, I guess.

The gnome_fonts variable installs fonts to a system-wide /usr/local/share/fonts/ location. Do you think it should it instead install them to a user location (such as /home/user/.local/share/fonts) similar to the first pattern above; or at least support installing to such a location, like the second pattern?

Separately, I haven't used the gnome_packages variable, but there are a couple of things that confuse me about it:

  • It seems specific to apt-based distros, since it uses ansible.builtin.apt directly. This likely wouldn't work on a non-apt system, right? If this is a limitation, would it be useful for me to open a separate issue for it?
  • The task name that uses the variable says Install (font) packages, but it seems like it doesn't really have anything to do with font packages specifically—it just passes the package list directly to the apt module, right?

grdryn avatar Aug 16 '22 23:08 grdryn

Great remarks @grdryn

I agree that the current setup can lead to some confusion as to where is installed what. As in: this should be improved (either documentation, but even better, in the code itself)

The current setup indeed only works for apt-based distros. Sometimes fonts can be installed by packages, yet the role now only supports apt.

PeterMosmans avatar Sep 09 '22 15:09 PeterMosmans

this should be improved (either documentation, but even better, in the code itself)

I'll try to propose an improvement or two as PRs then :) I'll probably first propose an option to install gnome_fonts to ~/.local/share/fonts (or to a user-specified location?), this way that variable hopefully could work without extra privileges.

grdryn avatar Sep 09 '22 22:09 grdryn