Aylur's Widgets Dashboard, currently, for getting the Avatar image of the user, it goes to find it in the following path:
/var/lib/AccountsService/icons/<username>
where <username>
is an image file.
In GNOME >=40, the folder above is empty and, for getting the Avatar working correctly, a user can create a symbolic link of the image to that path, for example by:
sudo ln -sf $HOME/.face /var/lib/AccountsService/icons/<username>
or can copy directly the avatar image there.
Currently, the Aylur Widgets does not manage the case where a GNOME user goes to Settings -> Users -> and change the avatar with a GNOME default avatar (for example "bicycle" stored on the default avatar GNOME image path in /usr/share/pixmaps/faces/
), so, in this case, Aylur's Widgets still keep the old avatar instead of new one.
In GNOME >=40, the Avatar path is specified in /var/lib/AccountsService/users/<username>
inside the Icon
variable, for example:
[User]
Session=
XSession=gnome-xorg
Icon=/usr/share/pixmaps/faces/bicycle.jpg
SystemAccount=false
and Icon
variable value changes according to the avatar user choice in GNOME settings, so it changes dynamically.
For making also Aylur's Widgets dashboard changing dynamically the user avatar, a good approach could be to change the following codes:
extensions/dateMenuTweaks.js
style: 'background-image: url("/var/lib/AccountsService/icons/'+ GLib.get_user_name() +'"); background-size: cover;',
extensions/quickSettingsTweaks.js
background-image: url("/var/lib/AccountsService/icons/${GLib.get_user_name()}");
shared/dashWidgets.js
background-image: url("/var/lib/AccountsService/icons/${GLib.get_user_name()}");
to call NOT /var/lib/AccountsService/icons/${GLib.get_user_name()}
but extracting the Icon
variable value from /var/lib/AccountsService/users/${GLib.get_user_name()}
and using that string value on background-image: url
.
In this manner, Aylur's Widgets dashboard avatar will change dynamically with the avatars selected by the user on GNOME Settings -> Users section.