Skip to content

Commit

Permalink
window-list: use ~/.local/share when looking for apps / icons
Browse files Browse the repository at this point in the history
The icons in the window list are loaded by parsing the desktop
files for a few variations of the window's app ID in a few known
locations.

Add /.local/share/applications to the list of locations it looks
in, to ensure that apps installed in the user's home directory
are considered as well.
  • Loading branch information
lcolitti committed Mar 27, 2024
1 parent 7f8f562 commit fb69c9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/panel/widgets/window-list/toplevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,12 @@ Icon get_from_desktop_app_info(std::string app_id)
{
Glib::RefPtr<Gio::DesktopAppInfo> app_info;

// TODO: evaluate getting this programmatically by depending on libxdg-basedir or similar.
const std::string home_dir(getenv("HOME"));
std::vector<std::string> prefixes = {
"",
home_dir + "/.local/share/applications/",
home_dir + "/.local/share/applications/org.kde.",
"/usr/share/applications/",
"/usr/share/applications/kde/",
"/usr/share/applications/org.kde.",
Expand Down

0 comments on commit fb69c9b

Please sign in to comment.