Compare commits

...

5 Commits

Author SHA1 Message Date
Zach DeCook bdbae443ab Notification: Rework priority and position of sender, summary, and body
Specifically, put the summary in the sender position when sender is blank
2022-09-23 00:05:30 -04:00
Elara fca64afbf3 Remove example comments from goreleaser config 2022-09-01 15:09:49 -07:00
Elara cf24c5ace8 Fix file extension of Alpine example 2022-09-01 15:02:11 -07:00
Elara a25b2e3e62 Add --allow-untrusted to Alpine example 2022-09-01 15:00:03 -07:00
Elara 2d0b64d92f Add installation instructions for major distros 2022-09-01 14:58:33 -07:00
3 changed files with 37 additions and 9 deletions

View File

@ -1,8 +1,5 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- id: itd

View File

@ -24,6 +24,36 @@
---
### Installation
Since ITD 0.0.7, packages are built and uploaded whenever a new release is created.
#### Arch Linux
Use the `itd-bin` or `itd-git` AUR packages.
#### Debian/Ubuntu
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.deb` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo apt install <package>`, replacing `<package>` with the path to the downloaded file. Note: relative paths must begin with `./`.
- Example: `sudo apt install ~/Downloads/itd-0.0.7-linux-aarch64.deb`
#### Fedora
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.rpm` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo dnf install <package>`, replacing `<package>` with the path to the downloaded file.
- Example: `sudo dnf install ~/Downloads/itd-0.0.7-linux-aarch64.rpm`
#### Alpine (and postmarketOS)
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.apk` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo apk add --allow-untrusted <package>`, replacing `<package>` with the path to the downloaded file.
- Example: `sudo apk add --allow-untrusted ~/Downloads/itd-0.0.7-linux-aarch64.apk`
Note: `--allow-untrusted` is required because ITD isn't part of a repository, and therefore is not signed.
---
### Socket
This daemon creates a UNIX socket at `/tmp/itd/socket`. It allows you to directly control the daemon and, by extension, the connected watch.

View File

@ -81,12 +81,13 @@ func initNotifRelay(ctx context.Context, dev *infinitime.Device) error {
body = translit.Transliterate(body, maps...)
var msg string
// If summary does not exist, set message to body.
// If it does, set message to summary, two newlines, and then body
if summary == "" {
msg = body
} else {
msg = fmt.Sprintf("%s\n\n%s", summary, body)
msg = body
// If sender doesn't exist, use summary
if sender == "" {
sender = summary
// if all three exist, set message to summary and body
} else if summary != "" {
msg = fmt.Sprintf("%s\n%s", summary, body)
}
dev.Notify(sender, msg)