# AppArmor profile for mako notification daemon for Wayland
# Version of mako profiled: 1.9.0
# Homepage: https://github.com/krathalan/apparmor-profiles
# Copyright 2019-2024 (C) krathalan; Licensed under GPLv3

abi <abi/3.0>,
include <tunables/global>

profile mako /usr/bin/mako {
  include if exists <local/mako>
  include <abstractions/base>
  include <abstractions/fonts>
  include <abstractions/krathalans-common-gui>
  network unix stream,

  # Shared memory
  owner /dev/shm/mako* rw,

  # Config file
  owner @{HOME}/.config/mako/** r,

  # Allow mako to view album covers from lollypop music player
  owner @{HOME}/.cache/lollypop/*.jpg r,
  
  # Allow mako to show icons for calbire notifications
  @{system_share_dirs}/calibre/images/* r,
}
