name: snapd-desktop-integration
version: '0.9'
summary: Desktop Integration for snapd
description: |
  Provides a user session daemon used to provide a bridge between
  the user's session and snapd.  Used for things like automatic
  theme installation.
architectures:
- amd64
base: core22
assumes:
- command-chain
- snapd2.43
apps:
  snapd-desktop-integration:
    command: usr/bin/snapd-desktop-integration
    restart-delay: 2s
    daemon: simple
    restart-condition: on-success
    plugs:
    - desktop
    - desktop-legacy
    - gsettings
    - opengl
    - wayland
    - x11
    - snap-themes-control
    - login-session-observe
    - snap
    - snap-refresh-observe
    - unity7
    - desktop-launch
    command-chain:
    - snap/command-chain/desktop-launch
    daemon-scope: user
confinement: strict
grade: stable
environment:
  SNAP_DESKTOP_RUNTIME: $SNAP/gnome-platform
  GTK_USE_PORTAL: '1'
  LD_LIBRARY_PATH: ${SNAP_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}:$SNAP/usr/lib:$SNAP/usr/lib/x86_64-linux-gnu
  PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH
plugs:
  snap:
    interface: system-files
    read:
    - /snap
  desktop:
    mount-host-font-cache: false
  gtk-3-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes
  gnome-42-2204:
    interface: content
    target: $SNAP/gnome-platform
    default-provider: gnome-42-2204
slots:
  snapd-desktop-integration:
    interface: dbus
    bus: session
    name: io.snapcraft.SnapDesktopIntegration
hooks:
  configure:
    command-chain:
    - snap/command-chain/hooks-configure-fonts
    plugs:
    - desktop
layout:
  /usr/share/locale:
    bind: $SNAP/usr/share/locale
  /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0:
    bind: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0
  /usr/lib/x86_64-linux-gnu/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
  /usr/share/xml/iso-codes:
    bind: $SNAP/gnome-platform/usr/share/xml/iso-codes
  /usr/share/libdrm:
    bind: $SNAP/gnome-platform/usr/share/libdrm
