Skip to content

✨ feat(api): add site_applications_dir property#442

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:435
Feb 14, 2026
Merged

✨ feat(api): add site_applications_dir property#442
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:435

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat commented Feb 14, 2026

Applications need to discover both user-specific and system-wide application directories for desktop integration. The library already provides user_applications_dir but lacked the corresponding site-level counterpart, creating an asymmetry with other directory pairs like user_data_dir/site_data_dir.

This adds site_applications_dir following official platform conventions verified from documentation. 📂 On Linux it returns /usr/share/applications (via $XDG_DATA_DIRS), on macOS /Applications, on Windows C:\ProgramData\Microsoft\Windows\Start Menu\Programs, and on Android it aliases to user_applications_dir since there's no system-wide distinction.

The implementation follows the established pattern of other site_*_dir properties with multipath support and respects the use_site_for_root option on Unix systems. ✨ This allows applications to properly discover where system-wide desktop entries and application shortcuts should be installed.

Platform documentation references:

Closes #435

Applications need to discover both user-specific and system-wide
application directories for desktop integration. The library already
provides user_applications_dir but lacked the corresponding site-level
counterpart, creating an asymmetry with other directory pairs.

This adds site_applications_dir following platform conventions:
- Linux: /usr/share/applications (via XDG_DATA_DIRS)
- macOS: /Applications
- Windows: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
- Android: same as user_applications_dir (no distinction)

The implementation follows the established pattern of other site_*_dir
properties and respects the use_site_for_root option on Unix systems.

Closes tox-dev#435
@gaborbernat gaborbernat requested a review from ofek as a code owner February 14, 2026 16:42
@gaborbernat gaborbernat enabled auto-merge (squash) February 14, 2026 16:45
@gaborbernat gaborbernat disabled auto-merge February 14, 2026 16:45
@gaborbernat gaborbernat merged commit 7a47ac4 into tox-dev:main Feb 14, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add site_applications_dir counterpart for user_applications_dir

1 participant