Skip to content

Commit

Permalink
Update TODO and README
Browse files Browse the repository at this point in the history
  • Loading branch information
rxhfcy committed Apr 7, 2024
1 parent bd05e62 commit b6fbbe2
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 37 deletions.
18 changes: 11 additions & 7 deletions Asahi Linux Helper/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **"3:" - Could have.** Desirable but not crucial, included if resources allow.
- **"4:" - Won't have.** Lowest priority, currently not planned.

## TODO items
## TODO items:
(please keep this TODO list up-to-date)

- [ ] (todo: add link to Linux version's TODO list)
Expand All @@ -15,6 +15,7 @@

- [ ] 1: Redo screenshots
- make menubar look as normal as possible
- icon on left
- show digital clock etc
- easter egg: show a funny time
- stereotypical wallpaper
Expand All @@ -38,21 +39,24 @@

- [ ] 3: Refactor: move some of the functions to separate files?

- [ ] 1: List all disks in main menu, allow booting to any of them
- [ ] 1: UI: List all disks in main menu, allow booting to any of them
- if just macOS and Linux, show "macOS" and "Linux"
- if more than 2 disks, list others than "/" (macOS) as full disk names (e.g. "Restart in 'Fedora Linux'...")
- show the text "(default)" after current default Startup Disk

- [ ] 2: UI: Actually show "(default)" for actual current default Startup Disk in menu

- [ ] 1: Make it possible to add app to Login Items
- use some else's solution as reference?
- if super simple, DIY?

- [ ] 2: Automatically add to / remove from Login Items if pref value disagrees with reality

- [ ] 2: Change current default Startup Disk (submenu)
- maybe: in help dialog: explain that changing default startup disk is not needed when using this app?
- [ ] 1: Mock UI to change current default Startup Disk (submenu)
- reason why in-app: Linux needs this to be in-app anyway, so make experience on Linux vs macOS consistent

- [ ] 2: Actually implement changing current default Startup Disk (submenu)

- [ ] 2: Proper Help dialog
- help icon in upper right corner of Preferences or something?
- explain what the app does and why
Expand Down Expand Up @@ -254,7 +258,7 @@

----------------------------------------

## Manual tests (test when releasing a new version and after major macOS updates, or something):
## Manual tests (test before releasing a new version and after major macOS updates?)

- [ ] Can some of these somehow be tested with normal Unit Tests / UI Tests?
- [ ] Build real releases with ARM64 / macOS 13.5+ only?
Expand Down Expand Up @@ -289,8 +293,8 @@
- [ ] Has a relevant Asahi Linux related thing changed? Does something need to be changed in this app to compensate?
- [ ] README and TODO: are macOS/Linux versions roughly similar, i.e. have they been kept in lockstep?
- I sure hope so, must be annoying to fix it not
- [ ] The actual point of this project: Does using the Asahi Linux installer automatically add "Restart in Linux"
menubar icon in a useful state (no password prompt or other stupid questions asked)?
- [ ] The actual point of this project: Does using the Asahi Linux installer automatically add a "Restart in Linux"
menubar icon in a useful state (works without password prompts or other silly questions & autoloads)?

----------------------------------------

Expand Down
69 changes: 39 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,64 @@

<img src="./misc/Menu_Screenshot.png" width="25%" alt="Main menu screenshot"><br>

**Asahi Restart Helper** adds a macOS menu bar icon that makes it easy to restart in Linux.
- You can keep macOS as the default Startup Disk if you want (uses Linux for this restart only!)
Easily select which OS loads next after you restart your Apple silicon Mac.

The app can also be used to restart back into macOS itself while keeping Linux as the default Startup Disk.
**Asahi Restart Helper (macOS version)** adds a macOS menu bar icon that makes it easy to restart using whichever OS you like. The default doesn't matter and won't be changed (unless you explicitly choose to change it).
- Allows you to restart and load Linux this time, and still use macOS as the default.
- ...or you can restart back into macOS itself, even if you want to keep Linux as the default.
- Alternatively, the application can also be used to change the default Startup Disk (not required, just an option)

**NOTE: project name, scope, icon and UI are still in heavy flux. Any details may change in the future. If you find bugs or have suggestions, please open an issue.**
**NOTE: project name, scope, description, icon and UI are still in heavy flux. If you find bugs or have any suggestions, please open an issue.**

Note: You can also install the corresponding Linux version of this app, to get the same functionality on Asahi Linux (KDE Plasma or GNOME). (todo: add link)
Note: You should also install the corresponding Linux version of this application, to get the same functionality on the Asahi Linux side (KDE Plasma or GNOME). (todo: add link)

## Screenshots:

<img src="./misc/Menu_Screenshot.png" width="50%" alt="Main menu screenshot"><br>
1\. Click "Restart in Linux..." from the menu to restart in Linux next.

1\. Click the app icon, and then select "Restart in Linux..." to load Linux next.

---

<img src="./misc/Restart_Dialog_Screenshot.png" width="50%" alt="Restart dialog screenshot"><br>
2\. Then click "Restart now!" from the Restart dialog. The system will restart without asking any further questions (if the correct permissions are set).
2\. Click "Restart now!" in the confirmation dialog.


The system will now restart without asking any further questions (if the correct permissions are set).

The default Startup Disk will **NOT** be changed.

---

<img src="./misc/Preferences_Screenshot.png" width="50%" alt="Preferences dialog screenshot"><br>
Preferences dialog (temporary placeholder UI)<br>

(dialogs use a popover "speech bubble" for technical reasons)

---

<img src="./misc/Change_Default_Screenshot.png" width="50%" alt="Change default startup disk dialog"><br>
The app can also be used to change the default Startup Disk directly from the menu<br>
(for parity with the future Linux version)
(using the app to restart doesn't require changing the default)
The app also allows changing the default Startup Disk directly from the menu<br>
(included for parity with the Linux version)

Using the app to restart does not require changing the default.

---

## Opening the Project in Xcode:
## Building the Project in Xcode:

1. Clone the repository: `git clone (URL)` or download the zip file and extract it
1. Clone this repository: `git clone (this URL)` or download the zip file and extract it
2. Launch Xcode, choose "Open another project..."
3. Navigate to the new folder (Xcode will automatically look for and open the `.xcodeproj` file)
3. Navigate to the new folder (Xcode will automatically look for and open the `.xcodeproj` bundle)
4. You should now be able to build and test the project (please open a new issue if that was not the case!)

## High-level technical explanation:

The app adds a menu bar icon that offers a convenient way to first use `bless --nextboot` to set the temporary Startup Disk for this restart only, and then restarts.
Basically this is a GUI for using Apple's `bless` tool with --nextonly.

So basically a pretty GUI for the following:
1. Runs `sudo bless --mount "/Volumes/Linux Disk Name/" --setBoot --nextonly`
2. Then restarts the computer relatively gracefully
- The app is not allowed to directly use and show the macOS standard Restart dialog
- Seems to honor the previously selected "Reopen windows when logging back in" setting from that dialog though (?)
The app offers a convenient way to first run `sudo bless --mount "/Volumes/Linux Disk Name/" --setBoot --nextonly` to temporarily use a Startup Disk for this restart only, and then restart.
- The default Startup Disk setting is never modified unless the user specifically chooses to do that.
- Note: macOS does not allow any app to directly use the macOS standard Restart dialog, so a custom confirmation dialog must be used.
- However, the "custom" restart does seem to honor any previously selected "Reopen windows when logging back in" setting from the aforementioned system restart dialog (?)

## Download initial demo version:

Expand All @@ -66,38 +73,40 @@ Download:

## Requirements:
- For Apple silicon Macs only (Asahi Linux is ARM64-only)
- macOS 13.5 or newer (or whatever the Asahi Linux installer requires)
- For macOS Ventura 13.5 or newer only (or whatever the Asahi Linux installer requires)
- Asahi Linux must already be installed on the computer
- Can't launch Asahi Linux installer from this app, at least for now

## Goals:
- The actual point of this app: after using the official Asahi Linux installer, make it easy to reboot using the "other" OS,
instead of requiring the user to already know the holding-down-the-power-button trick
(and/or to already know how to change the default startup disk)
- Help users conveniently boot to Linux from macOS (use the Linux version for the other way around)
- Help users conveniently boot to whichever OS they want (use the Linux version to do the same on Linux)
- Don't be annoying
- Don't be stupid
- Keep it simple
- Use non-technical language (give newbies a chance, experts will know how to use the app regardless of word choices)
- Hide implementation details, but if the user wants to know how and why, explain in the help dialog

## Stretch goals:
- Somehow convince the official Asahi installer to automatically install this app (icon in user's macOS menubar)
- Somehow convince the official Asahi installer to automatically install this app icon in user's macOS menubar
- Somehow convince Asahi project to take over and adopt this app
(have someone else maintain it, and fix the code if necessary)
- Bonus: somehow convince Asahi installer to not silently make Asahi Linux the default Startup Disk and
not completely hide all evidence of user's macOS installation ever existing by default (!)
- Bonus: somehow convince Asahi installer to not silently make Asahi Linux the default Startup Disk
- reason: from a new user's perspective, the installer completely hides all evidence of the user's
macOS installation ever having existed by default,
unless you already happen to know the secret spell or gesture (!)

### (Stretch goals for the upcoming Linux version)
- Somehow convince whatever the Asahi installer installs (currently Fedora Asahi Remix) to automatically
### (Stretch goals for the Linux version)
- Somehow convince any OS the Asahi installer installs (currently Fedora Asahi Remix) to automatically
install a corresponding app icon in Linux too (todo: implement Linux version of this app)
- Also install the extension that allows showing the icon on Gnome? (KDE Plasma allows showing the icon by default)
- Bonus: somehow convince the developer of "asahi-bless" (Linux "bless" counterpart) to add the necessary
- Bonus: somehow convince the developer of "asahi-bless" (the Linux "bless" counterpart) to add more helpful
command line options, and generally make the tool easier to use
- Bonus: somehow convince whatever Asahi installer installs (currently Fedora Asahi Remix) to automatically
- Bonus: somehow convince any OS the Asahi installer installs (currently Fedora Asahi Remix) to automatically
install asahi-bless by default

## Project non-goals:
## Non-goals:
- Don't support macOS versions older than 12.3 (only support what the Asahi Linux installer supports)
- Don't support Intel Macs (only support what the Asahi Linux installer supports)
- Don't implement anything that could be considered "scope creep"
Expand Down

0 comments on commit b6fbbe2

Please sign in to comment.