Skip to content

Feature/auto move application#1088

Open
selfsta wants to merge 2 commits intoTheBoredTeam:devfrom
selfsta:feature/auto-move-application
Open

Feature/auto move application#1088
selfsta wants to merge 2 commits intoTheBoredTeam:devfrom
selfsta:feature/auto-move-application

Conversation

@selfsta
Copy link

@selfsta selfsta commented Mar 7, 2026

feat: add "Move to Applications" prompt

Overview

PR addresses the issue of users running the app directly from the ~/Downloads folder. While the upcoming release .dmg provides a visual guide, this implementation provides a fallback prompt to help users move the app to the correct location.

Prompt Preview

Screenshot 2026-03-06 at 5 50 43 PM

Key Changes

Automatic Path Detection

Added checkForApplicationsFolder() to verify the app's current location on launch. It checks both the system-wide /Applications folder and the user-specific ~/Applications folder using NSHomeDirectory().

Move Logic

Instead of adding an external dependency, I implemented a private moveSelfToApplications(appPath:) method.

  • Dynamic App Retrieval: The script dynamically fetches the app name from CFBundleDisplayName or CFBundleName to ensure the "activate" command works regardless of naming changes.
  • AppleScript Integration: Uses NSAppleScript to delegate the move to Finder. This is the most lightweight way to handle an active process moving itself without requiring complex shell scripts or third-party libraries.

Integration Point

The check is triggered within applicationDidFinishLaunching, placed after the primary window and detector setup to ensure the app remains responsive during the prompt.

Safety

The implementation uses runModal() to ensure the user makes a choice before the app continues into potentially background-only operations.

How to Test

  1. Compile the app.
  2. Move the .app bundle to any folder besides /Applications .
  3. Launch the app.
  4. Expected Result: An informational alert appears asking to move the app.
  5. Click Move.
  6. Expected Result: Finder moves the app to /Applications, and the app re-activates from the new location.

Note:

Unsure of why other commits are showing in my PR, all my changes were made to boringNotchApp.swift

@Alexander5015
Copy link
Member

please rebase yout changes onto dev

@selfsta selfsta force-pushed the feature/auto-move-application branch from c16bea5 to 8220817 Compare March 7, 2026 03:13
@selfsta
Copy link
Author

selfsta commented Mar 7, 2026

please rebase yout changes onto dev

Done, do I need to open a new PR?

@Alexander5015 Alexander5015 force-pushed the feature/auto-move-application branch from 8220817 to 1fd3dd6 Compare March 7, 2026 03:51
@Alexander5015
Copy link
Member

You do not need to make a new PR, but it the git history still not correct(it should not show my commits). I edited it to fix it. If you need to do this in the future, run git rebase -i <branch you are rebasing onto>

@Alexander5015
Copy link
Member

Also, make sure you do not let AI coding tools make changes to Localizable.xcstrings‎ file. I reverted all of the changes it made.

Copy link
Member

@Alexander5015 Alexander5015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this, but it didn’t behave as I expected. Is the intention for it to open a file picker? If so, that might not add much benefit, since users could likely move the file themselves more easily. When I selected a file, nothing happened.

Another thing to keep in mind is that the app will usually be run from a DMG, which is a read-only volume. That would prevent moving the file from there (I tested from a normal folder).

I might be misunderstanding the approach, but because of this it may make sense to close this PR.

If you’re interested in working on something in a similar area—improving user-facing messaging) there’s an important issue, #1077, that’s currently blocking the next update and hasn’t been picked up yet. If you’d like to take a look, I’d be happy to explain the details in DMs.

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