# vim:syntax=apparmor
# ------------------------------------------------------------------
#
#    Copyright (C) 2009 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

  # system configuration
  @{system_share_dirs}/applications/{**,} r,
  @{system_share_dirs}/icons/{**,}        r,
  @{system_share_dirs}/pixmaps/{**,}      r,

  # communitheme snap
  /snap/communitheme/*/share/icons/   r,
  /snap/communitheme/*/share/icons/** r,

  # mimeinfo and desktop files for snaps
  /var/lib/snapd/desktop/applications/mimeinfo.cache r,
  /var/lib/snapd/desktop/applications/{,*.desktop} r,

  # this should probably go elsewhere
  @{system_share_dirs}/mime/** r,

  # per-user configurations
  owner @{HOME}/.icons/                 r,
  owner @{HOME}/.recently-used.xbel*    rw,
  owner @{HOME}/.local/share/recently-used.xbel* rw,
  owner @{HOME}/.config/user-dirs.dirs  r,
  owner @{HOME}/.config/mimeapps.list   r,
  owner @{user_share_dirs}/applications/{**,} r,
  owner @{user_share_dirs}/icons/{**,}        r,
  owner @{user_share_dirs}/mime/{**,}         r,
