forked from Elara6331/itd
Compare commits
5 Commits
5efafe9be7
...
bdbae443ab
Author | SHA1 | Date |
---|---|---|
Zach DeCook | bdbae443ab | |
Elara | fca64afbf3 | |
Elara | cf24c5ace8 | |
Elara | a25b2e3e62 | |
Elara | 2d0b64d92f |
|
@ -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
|
||||
|
|
30
README.md
30
README.md
|
@ -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.
|
||||
|
|
13
notifs.go
13
notifs.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue