# apparmor-profiles - apparmor reference profiles
# Copyright (C) 2023-2026 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

# Define commonly used desktops program names and paths.

# Open
@{open_names} = exo-open xdg-open gio kde-open gio-launch-desktop
@{open_path}  = @{bin}/@{open_names} @{lib}/gio-launch-desktop
@{open_path} += @{lib}/@{multiarch}/glib-@{version}/gio-launch-desktop

# Gstreamer plugin scanner
@{gstreamer_path} = @{lib}/@{multiarch}/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
@{gstreamer_path} += @{lib}/@{multiarch}/gstreamer-1.0/gst-plugin-scanner
@{gstreamer_path} += @{lib}/gstreamer-1.0/gst-plugin-scanner
@{gstreamer_path} += @{lib}/gstreamer-1.0/gst-plugin-scanner-@{arch}

# Thunderbird (Thunderbird is technically a firefox based browser)
@{thunderbird_name} = thunderbird{,-bin}
@{thunderbird_lib_dirs} = @{lib}/@{thunderbird_name}
@{thunderbird_path} = @{bin}/@{thunderbird_name} @{thunderbird_lib_dirs}/@{thunderbird_name}

# Emails
@{emails_names} = evolution geary proton-mail
@{emails_path} = @{thunderbird_path} @{bin}/@{emails_names} "/opt/proton-mail/Proton Mail"

# UI Editors
@{editor_ui_names} = gnome-text-editor gedit mousepad
@{editor_ui_path} = @{bin}/@{editor_ui_names}

# File explorers
@{file_explorers_names} = dolphin nautilus thunar
@{file_explorers_path} = @{bin}/@{file_explorers_names}

# Text editors
@{text_editors_names} = code gedit mousepad gnome-text-editor zeditor zedit zed-cli
@{text_editors_path} = @{bin}/@{text_editors_names} /usr/share/code/{bin/,}code

# Document viewers
@{document_viewers_names} = evince papers okular *{F,f}oliate YACReader
@{document_viewers_path} = @{bin}/@{document_viewers_names}

# Image viewers
@{image_viewers_names} = eog loupe ristretto
@{image_viewers_path} = @{bin}/@{image_viewers_names}

# Archive viewers
@{archive_viewers_names} = engrampa file-roller xarchiver
@{archive_viewers_path} = @{bin}/@{archive_viewers_names}

# Office suites
@{offices_names} = libreoffice soffice wps
@{offices_path} = @{bin}/@{offices_names} @{lib}/libreoffice/program/soffice

# Help
@{help_names} = yelp
@{help_path} = @{bin}/@{help_names}

# Terminal emulator
@{terminal_names} = xdg-terminal-exec kgx terminator konsole ptyxis ghostty
@{terminal_path} = @{bin}/@{terminal_names}

# Backup
@{backup_names} = deja-dup borg
@{backup_path} = @{bin}/@{backup_names} @{lib}/deja-dup/deja-dup-monitor

# Steam
@{steam_share_dirs} = @{user_share_dirs}/Steam @{HOME}/.steam/debian-installation
@{steam_lib_dirs} = @{steam_share_dirs}/ubuntu@{int2}_{32,64}

include if exists <tunables/path/desktop.d>

# vim:syntax=apparmor
