Skip to content

Feature: support current user's Application directory#41

Open
ghostwich wants to merge 5 commits into
dutkiewiczmaciej:mainfrom
ghostwich:develop
Open

Feature: support current user's Application directory#41
ghostwich wants to merge 5 commits into
dutkiewiczmaciej:mainfrom
ghostwich:develop

Conversation

@ghostwich
Copy link
Copy Markdown

Summary

Support applications in the current user's Applications directory.

Changes

  • append the current user's Applications directory in the AppPicker

@dutkiewiczmaciej
Copy link
Copy Markdown
Owner

Thanks for the PR! This is a useful addition — Homebrew installs casks to ~/Applications by default, so this makes sense.

One small thing: could you also add a de-duplication check? If the same app exists in both /Applications and ~/Applications, it would show up twice in the picker. Something like filtering by bundle identifier before returning the list should do it.

Other than that, looks good!

@ghostwich
Copy link
Copy Markdown
Author

I’m trying to think if there is a good reason an application would exist in both places- it is certainly an edge case. If so, then it may make more sense to clarify which location the application is found, as opposed to deduplication (which would, in effect, leave the user with no option to select the intended application).

Should the picker instead be updated to expose the location in addition to the application name and bundle identifier?

@ghostwich
Copy link
Copy Markdown
Author

ghostwich commented Apr 17, 2026

I modified AppPickerView to include the path. Have a look at the latest commit.

…o Protected Applications view in Settings window
@ghostwich
Copy link
Copy Markdown
Author

macshot_2026-04-17_16-15-42 macshot_2026-04-17_16-15-52

@dutkiewiczmaciej
Copy link
Copy Markdown
Owner

Good point about showing the path instead of deduplication — makes sense, the user can decide which one they want.

I spotted one bug though: the path concatenation is missing a /:

FileManager.default.homeDirectoryForCurrentUser.path() + "Applications"

This would resolve to something like /Users/maciej/Applications only if .path() returns a trailing slash (which isn't guaranteed). Safer to use:

FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("Applications").path

Or at minimum add the slash explicitly.

Also one minor UX thought — showing both path and bundle identifier on every row is a lot of text. Maybe just show the path? The bundle ID is mainly useful for debugging, and path already tells you where the app lives. Up to you though, not a blocker.

Fix the path bug and this is good to merge!

@ghostwich
Copy link
Copy Markdown
Author

Interestingly enough… in my first commit I did have a leading slash for “Applications” but it resulted in a double slash (no negative effects that I saw during testing).

I’ve taken the suggestion with the path, as well as changing the output by removing the bundle identifier. The path will be displayed in both the App picker as well as the pane in the Settings window.

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.

2 participants