My Quick Notes

Ain't Nobody Got Time to Read

Latest stories

49 articles

How to prevent focus stealing in KDE Plasma

Open System Settings > Window Management > Window Behavior > 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...

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 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...

Setup Bridged Wireless Access Point on Raspberry Pi 4

                                         +- RPi -------+
                                     +---+ 10.10.0.2   |          +- Laptop ----+
                                     |   |     WLAN AP +-)))  (((-+ WLAN Client |
                                     |   |  Bridge     |          | 10.10.0.5   |
                                     |   +-------------+          +-------------+
                 +- Router ----+     |
                 | Firewall    |     |   +- PC#2 ------+
(Internet)---WAN-+ DHCP server +-LAN-+---+ 10.10.0.3   |
                 |   10.10.0.1 |     |   +-------------+
                 +-------------+     |
                                     |   +- PC#1 ------+
                                     +---+ 10.10.0.4   |
                                         +-------------+
Read More...

Upgrade Fedora 36 to Fedora 37

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

Read More...

Raspberry Pi 4 as Routed Wireless Access Point



                                         +- RPi -------+
                                     +---+ 192.168.1.2 |          +- Laptop ----+
                                     |   |     WLAN AP +-)))  (((-+ WLAN Client |
                                     |   | 192.168.3.1 |          | 192.168.3.2 |
                                     |   +-------------+          +-------------+
                 +- Router ----+     |
                 | Firewall    |     |   +- PC#1 ------+
(Internet)---WAN-+ DHCP server +-LAN-+---+ 192.168.1.3 |
                 | 192.168.1.1 |     |   +-------------+
                 +-------------+     |
                                     |   +- PC#2 ------+
                                     +---+ 192.168.1.4 |
                                         +-------------+
Read More...