Tricks for daily PinePhone users

For a few weeks now, I have been daily driving my (original) PinePhone to a certain extent, and I have compiled a brief list of scripts and tricks that might be helpful to others. Also, since I keep reflashing the operating system in it more often than I would like to, and it would be nice to a have a centralised place to store such stuff.

Vibration for notifications

When the phone is locked (e.g.: the screen is off), notifications do not emit any sound or vibration, but only the notification LED would blink. This trick below makes the phone (only) vibrate when a notification is received.

{

"event-name" : "message-missed-notification",

"type"       : "VibraRumble",

"duration"   : 1000

}

## Disabling keypress vibration

Each keypress on `squeekboard` will trigger a short vibration that I find particularly annoying. While modifying keypress vibration duration seems possible on the Tweaks application, assigning it to `0` changes nothing. Instead, one has to modify `/usr/share/feedbackd/themes/pine64,pinephone.json`. Specifically, set a null `type` to events `button-pressed` and `button-released`, as shown belown:

{

"event-name" : "button-pressed",

"type" : ""

},

{

"event-name" : "button-released",

"type" : ""

}

## Mobile-friendly Dino (XMPP)

Dino is a XMPP client written in Vala and GTK-3 for GNU/Linux. It should generally work great on desktop, but IMHO it needs a few tweaks just to make it better for mobile devices.

- Added a send button on the UI, so the Enter key is instead used to insert `\n`;
- Merged `libhandy` branch;
- Do not pop down after selecting an emoji;
- Imported quote button from:
=> https://github.com/MarcoPolo-PasTonMolo/dino	Dino fork with quote button support
- Worked around issue with edit and quote buttons not appearing when selecting text;
- Reduced emoji chooser dimensions, so they can fit into the PinePhone screen.

All these changes are grouped into the `pinephone` branch of my fork of Dino, available below:

=> https://gitea.privatedns.org/Xavi92/dino/src/branch/pinephone	Mobile-friendly fork of Dino

## Periodical suspend/wakeup

Ideally, the PinePhone performs best and most stable if not suspended. However, and similarly to most mobile devices, the PinePhone saves most energy when suspended. However, no notifications can be received while the device is suspended, but only calls and SMS. This makes receiving notifications such as emails or XMPP messages impossible, unless the user wakes up the device regularly. I find this very distracting for users, so one must find a way to wake up the device at regular intervals, just enough time for the phone to receive any incoming notifications.

So I came up with a (rather complex) shell script that does that, while ensuring not to mess up with `systemd`-level inhibitors that might be active at any moment (e.g.: when Lollypop plays music) or the screen is on, among other conditions. It is heavily based on the following amazing project:

=> https://github.com/milky-sway/pinephone-scripts	Automatic suspend/wakeup script for the PinePhone

I try to contribute to upstream as much as possible, while keeping some local modifications for experimentation purposes. This is an exact copy of the script that is currently running on my phone:

=> /sleepwalk.sh	Fork of pinephone-scripts

The script needs some unused functions be removed, but should still work as is. Users should have special care with the configuration values at the top - most importantly:

WAKE_SECS

SLEEP_STEP

SLEEP_SECS_INIT

SLEEP_MAX_SECS

Proxy Information
Original URL
gemini://xavi.privatedns.org/pinephone-tricks.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
1571.407528 milliseconds
Gemini-to-HTML Time
0.756849 milliseconds

This content has been proxied by September (3851b).