|
| 1 | +# Launchpad_Back (English) |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +As macOS 26 Tahoe removed the native Launchpad, this SwiftUI application was created for convenience to replicate its core functionality. It provides a user-friendly interface to view, search, and launch installed applications in a familiar grid-based, paginated layout. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +* **Application Discovery**: Automatically scans and displays all applications from standard macOS directories (`/Applications`, `/System/Applications`, and `/System/Applications/Utilities`). |
| 12 | +* **Grid Layout & Pagination**: Arranges apps in a clean grid. If there are more apps than can fit on one screen, they are organized into multiple pages. |
| 13 | +* **Smooth Navigation**: Users can navigate between pages using: |
| 14 | + * A two-finger swipe gesture on the trackpad. |
| 15 | + * A click-and-drag gesture with the mouse. |
| 16 | + * Arrow keys. |
| 17 | +* **Real-time Search**: A search bar at the top allows users to instantly filter applications by name. |
| 18 | +* **Visual Appeal**: Features a blurred, translucent background effect that mimics the native macOS Launchpad (an attempt was made to create a Liquid Glass effect, but it proved too difficult). |
| 19 | +* **Keyboard Shortcuts**: |
| 20 | + * `Cmd + W`: Close the Launchpad window. |
| 21 | + * `Cmd + Q`: Quit the application. |
| 22 | + * `Esc`: Clear the search field or close the window if the search is empty. |
| 23 | + * `Arrow Keys`: Switch pages. |
| 24 | +* **Performance**: |
| 25 | + * App scanning is performed on a background thread to keep the UI responsive. |
| 26 | + * App icons are loaded asynchronously and cached. |
| 27 | + |
| 28 | +## How It Works |
| 29 | + |
| 30 | +* **`LaunchpadViewModel`**: This is the core of the application's logic. It's responsible for finding all `.app` bundles, parsing their `Info.plist` to get metadata (like name and bundle ID), handling duplicates, and providing the final list of apps to the view. |
| 31 | +* **`ContentView`**: This file contains all the SwiftUI views that make up the user interface. |
| 32 | + * `LaunchpadView`: The main view that orchestrates all other components. |
| 33 | + * `PageView`: Represents a single page in the grid. |
| 34 | + * `AppIcon`: A view for an individual application icon and its name. |
| 35 | + * `SearchBar`: The search component. |
| 36 | + * `PageIndicator`: The dots at the bottom indicating the current page. |
| 37 | +* **Gesture & Event Handling**: The app uses a combination of `DragGesture` for mouse dragging, a custom `NSViewRepresentable` (`TouchpadScrollView`) to detect trackpad scrolling, and `NSEvent.addLocalMonitorForEvents` to listen for global keyboard events. |
0 commit comments