diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4ee7b..33d632c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,21 @@ can change how things behave. It does not only add new things. sees only the repeaters that your radio hears, and only while it is connected. `meshterm chat history --channel` shows the same count in a `HEARD` column, and `--json` gives `heard` and `heard_by` (#38). +- **MeshTerm plays sounds for the messages that you want to know about.** A DM, a mention + of your node, a channel message, a room post, and a low battery each have their own + sound, from Android's set (the Android Open Source Project, under the same licence as + MeshTerm). Each channel, DM, and room has a *Sound* row: off, mentions, all messages, or + the default for its kind (all messages for a DM, mentions for a channel or a room). + Ctrl+S mutes or unmutes the sounds from any screen, and the header shows ๐Ÿ”Š or ๐Ÿ”‡. The + new *Sound* group of preferences has the theme (Android, terminal bell, or no sound), a + volume slider of ten steps that plays each step, a short tick for each packet heard (off + by default), and a flash of the title for a notification that plays no sound. The + PicoCalc has no sound, so there each notification flashes. The idea came from the + MeshTerm Discord. + +### Changed + +- **Ctrl+E shows or hides the pairing PIN.** It was Ctrl+S, which now mutes the sounds. ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index a51ae3b..d901c8d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -183,7 +183,10 @@ deliberately, one at a time, and say why in the code. keeps the chip that asked: its F3 reads `Quit!` and sends the same `quit`, which with the question up is the leaving โ€” one key pressed twice, as ^Q is. `test_navigation` walks every string literal in the package to keep them out of the rest - of the UI. + of the UI. **^S** is the third global verb (JP, 2026-11-20): it mutes or unmutes the + sounds (`sound_muted`, `services/sound.py`), answered in `_dispatch` through + `set_sound_toggle`, shown by the header's ๐Ÿ”Š/๐Ÿ”‡ and the menu's Sound row above Quit, never + a chip. The PIN reveal moved from ^S to ^E for it. "No sound" is a *theme*, not the mute. - **Holding Esc quits**, from anywhere, wherever MeshTerm can tell a key is held (`services/hold_to_quit.py`): a front end that reads its own keys (the emulator, both devices), or a probe that asks the keyboard whether a terminal's Esc is still down @@ -560,6 +563,7 @@ as a grouped list does. Filling a page in is editing its `.md`; no Python follow ๐Ÿ”’ lock (a locked contact, a private channel) ยท ๐Ÿ”“ unlock ยท ๐Ÿ—‘ clear/delete ยท โœŽ compose/edit ยท โš™ parameter ยท `#` count ยท โ–ถ run ยท โšก explore/probe ยท โ˜… best/winner ยท โญ watch ยท ๐Ÿ“ค send now ยท ๐Ÿ“จ courier/queue ยท ๐Ÿ’ฌ chat ยท ๐Ÿ”” notify ยท ๐Ÿ”• mute (notifications off) ยท + ๐Ÿ”Š sound on / a conversation's Sound row ยท ๐Ÿ”‡ sounds muted (header, menu row) ยท ๐Ÿ“ฑ QR ยท ๐Ÿ”— link ยท โ†ป re-read ยท โ†• reorder ยท โ‡„ reverse (flip a path's direction) ยท ๐Ÿ”– region/scope ยท ๐Ÿ“Œ rooms ยท ๐Ÿ† trophy case/record ยท โŒจ command line ยท ๐Ÿ“– read/about ยท ๐Ÿ’ฐ support/donate ยท ๐ŸŽจ pixel image (an MCOimg picture in a message) ยท ๐Ÿšช quit. Packet-class icons (feed/viewer diff --git a/docs/guide/features.md b/docs/guide/features.md index e95275b..2774945 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -70,13 +70,53 @@ only describe it. The written pages are at the end. | Feature | What it does | Scripted | | --- | --- | --- | -| **โš™ Preferences** | How MeshTerm behaves, in eight groups: Device, Sending, TX optimize, Watchtower, Map, History, Display, and Diagnostics. The page stages your changes, and you save them with one action at the bottom. MeshTerm writes only the values that you changed to `preferences.toml`. [Configuring MeshTerm](configuration.md) has the detail. | `meshterm preferences show / set / reset` | +| **โš™ Preferences** | How MeshTerm behaves, in nine groups: Device, Sending, TX optimize, Watchtower, Map, History, Sound, Display, and Diagnostics. The page stages your changes, and you save them with one action at the bottom. MeshTerm writes only the values that you changed to `preferences.toml`. [Configuring MeshTerm](configuration.md) has the detail. | `meshterm preferences show / set / reset` | | **๐Ÿฉบ Diagnostics** | One block of information that each bug report starts with. It shows which build you have and how you installed it, the operating system, the terminal and its size, and the radio and its link. It also shows the verdicts from boot time that no other screen shows (icons, powerline, platform flavour, and the reasons), and how much history MeshTerm stored. It has nothing private: no keys, passwords, positions, or contact names. It describes the mesh only as counts for each table and the span of time that the tables cover. Press `a` to anonymize it: your account name in the home folder and the addresses of your radio and hosts are masked, and each keeps a tidbit (`j*********u`, `DA:xx:xx:xx:7C:7C`). Press `s` to save the block beside the log, to attach to a report. The **Anonymize** preference opens the page anonymized, and masks the log too. | `meshterm diagnostics [--out PATH] [--anonymize]` | -| **๐Ÿ“– About MeshTerm** | What MeshTerm is, where it came from, and the terms of its licence. It includes the map credit, the font credit, and the licence URL. | `meshterm about` | +| **๐Ÿ“– About MeshTerm** | What MeshTerm is, where it came from, and the terms of its licence. It includes the map credit, the font credit, the sound credit, and the licence URL. | `meshterm about` | | **๐Ÿ‘ค About the author** | The person behind MeshTerm, on the mesh and away from it. | `meshterm about-author` | | **๐Ÿ”— Join Discord** | The community server. The page has one invite link and a QR code of the link, which a phone can read. | `meshterm discord` | | **๐Ÿ’ฐ Support MeshTerm** | What keeps MeshTerm going, and the ways to help it, with money and without money. | `meshterm support` | +## Sounds + +MeshTerm plays a sound when something arrives that you want to know about now: + +| Event | When it plays | +| --- | --- | +| Direct message | A DM arrives | +| Mention | A message in any conversation mentions your node (`@[Your name]`) | +| Channel message | A message arrives on a channel that you set to **All** | +| Room post | A post arrives in a room that you set to **All** | +| Battery low | The battery goes below 25% (the **Battery low** preference). It plays one time, and again only after the battery is 5 points higher or charges | +| Packet tick | A very short tick for each packet heard that plays no other sound. It is off until you turn on **Packet tick**, and it plays at most four times each second | + +The conversation that is open on the screen makes no sound, because you already see it. + +Each channel, DM, and room has a **Sound** row: on the channel page, on the node page of +the contact, and on the room page. Select **Off**, **Mentions**, **All messages**, or +**Default**. Default follows the preference for that kind of conversation: all messages +for a DM, and mentions for a channel or a room. The mute of a channel (๐Ÿ”•) is a different +setting. It removes the channel from the unread count, but a mention in it still plays a +sound. + +**Ctrl+S** mutes or unmutes the sounds from any screen. The header shows ๐Ÿ”Š while the +sounds play and ๐Ÿ”‡ while they are muted. The **Sound** row above Quit in the main menu +does the same. To have no sound at all, select the **no sound** theme on the Preferences +page. The other themes are **Android** (the default) and **terminal bell**, which rings the +bell of your terminal, also over SSH. + +**Volume** is a slider with ten steps on the Preferences page. Each step plays the +channel message sound, so that you hear the level before you apply it. + +When no sound plays, the title of the screen can flash instead. The **Flash** preference +selects when: off, on, or **when silent** (the default), which flashes when the sounds are +muted or the theme is no sound. The PicoCalc has no sound, so there each notification +flashes. + +MeshTerm plays the sounds through the player of your computer: `winsound` on Windows, +`afplay` on macOS, and `pw-play`, `paplay`, or `aplay` on Linux. If none of them works, +MeshTerm writes one line in its log and continues with no sound. + ## Leaving MeshTerm **Quit** at the bottom of the main menu leaves MeshTerm, after it asks you to confirm.