My Quick Notes

Ain't Nobody Got Time to Read

4 articles

How to properly exit Bevy app on Android

Normally, a Bevy application can exit with AppExit, like:

fn exit_system(mut exit_event: MessageWriter<AppExit>) {
    exit_event.write(AppExit::Success);
}

But on Android, that is not enough and can cause the app fails to reopen. To completely exit the Bevy application on Android, we need to exit on the Android side too.

 .--------------------------------------.           .------------------------------.
|                  Bevy                  |         |            Android             |
|   .------------.     .------------.    |         |   .------------.               |
|  |    system    |   |     main     |   |         |  | MainActivity |              |
|   '-----+-+----'     '-----+-+----'    |         |   '-----+-+----'               |
|         | |    AppExit     | |         |         |         | |                    |
|         +-+--------------->| |         |         |         | |                    |
|                            | |     exitAppActivity         | |                    |
|                            +-+---------------------------->| |                    |
|                                        |         |         | +---.                |
|                                        |         |         | |   | finishAffinity |
|                                        |         |         | |   |                |
|                                        |         |         +-+<--'                |
|                                        |         |                                |
 '--------------------------------------'           '------------------------------'
Read More...

Vim - Save file as root without reopening file

File requires root permission to be written, but sometimes we forget to add sudo before vim command. The result is after editing the file with a lot of changes, :w cannot save them. This can be avoided by adding a sim…

Read More...

How to prevent focus stealing in KDE Plasma

Open System Settings &gt; Window Management &gt; Window Behavior &gt; Focus. In the dropdown menu "Focus stealing prevention", select the level you want. None: Prevention is turned off and new windows always become act…

Read More...

Upgrade Fedora 42 to Fedora 43

Update Fedora 42: sudo dnf upgrade --refresh Reboot. Install dnf-plugin-system-upgrade if not installed: sudo dnf install dnf-plugin-system-upgrade Download Fedora 43 packages: sudo dnf system-upgrade download --re…

Read More...