Skip to content

Add site_applications_dir counterpart for user_applications_dir #435

@PhrozenByte

Description

@PhrozenByte

The user_applications_dir method currently lacks a site_applications_dir counterpart.

Some suggestions:

  • Unix:
    • /usr/share/applications?
    • Or a /usr/local/share/applications:/usr/share/applications multipath? As with site_log_dir (Add site_state_dir() counterpart for user_state_dir() #214) and site_bin_dir (Add site_bin_dir counterpart for user_bin_dir #434), platformdirs might choose not to use a multipath for consistency reasons.
    • Or maybe even use $XDG_DATA_DIRS with appended …/applications as multipath? However, note that this env variable often includes paths of other software, e.g. $HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share from Flatpak, so platformdirs would need to filter that somehow… That's rather inconvenient.
  • Android: user_applications_dir alias (which is an alias for user_data_dir)? As with any other site_*_dir counterpart…
  • Windows: %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs
  • Mac OS: /Applications? Sounds about right, but I have no Mac, so no idea…

Note that user_applications_dir currently doesn't accept $appauthor, $appname, $version.

If implemented, user_applications_dir should support the use_site_for_root option and redirect calls to site_applications_dir if enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions