From 2ec9607b3c7a8d856def8336a90a262c1884d66e Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 11 Dec 2022 20:18:26 +0000 Subject: [PATCH] Add flatpak to XDG_DATA_DIRS --- roles/home-cli/files/profile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 1d3fae4..e1b2add 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -57,6 +57,13 @@ then XDG_DATA_DIRS="${XDG_DATA_DIRS}:${_snap_xdg_path}" fi unset _snap_xdg_path +# Same as above for Flatpak. +_flatpak_xdg_path="$XDG_DATA_HOME/flatpak/exports/share" +if [ -x /usr/bin/flatpak ] && [ -n "${XDG_DATA_DIRS##*${_flatpak_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${_flatpak_xdg_path}:*}" ] +then + XDG_DATA_DIRS="${XDG_DATA_DIRS}:${_flatpak_xdg_path}" +fi +unset _flatpak_xdg_path # Bash-specific settings that will not work in other Bourne-compatible shells. if [ -n "$BASH_VERSION" ]