forked from Elara6331/itd
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
395cded975 | |||
254b675f2c | |||
669788034f | |||
ac7c626f56 | |||
1c623051ec | |||
cec539f85b |
@@ -14,6 +14,7 @@ builds:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
- riscv64
|
||||
goarm:
|
||||
- 7
|
||||
- id: itctl
|
||||
|
12
README.md
12
README.md
@@ -6,6 +6,8 @@
|
||||
[](https://ci.elara.ws/Elara6331/itd)
|
||||
[](https://aur.archlinux.org/packages/itd-git/)
|
||||
[](https://aur.archlinux.org/packages/itd-bin/)
|
||||
[](https://lure.elara.ws/pkg/default/itd-git)
|
||||
[](https://lure.elara.ws/pkg/default/itd-bin)
|
||||
|
||||
---
|
||||
|
||||
@@ -36,19 +38,19 @@ 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.
|
||||
- Go to the [latest release](https://gitea.elara.ws/Elara6331/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.
|
||||
- Go to the [latest release](https://gitea.elara.ws/Elara6331/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.
|
||||
- Go to the [latest release](https://gitea.elara.ws/Elara6331/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`
|
||||
|
||||
@@ -91,11 +93,11 @@ In `cmd/itgui`, there is a gui frontend to the socket of `itd`. It uses the [Fyn
|
||||
|
||||
#### Easy Installation
|
||||
|
||||
The easiest way to install `itgui` is to use my other project, [LURE](https://gitea.arsenm.dev/Arsen6331/lure). LURE will only work if your package manager is `apt`, `dnf`, `yum`, `zypper`, `pacman`, or `apk`.
|
||||
The easiest way to install `itgui` is to use my other project, [LURE](https://gitea.elara.ws/Elara6331/lure). LURE will only work if your package manager is `apt`, `dnf`, `yum`, `zypper`, `pacman`, or `apk`.
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Install LURE. This can be done with the following command: `curl https://www.arsenm.dev/lure.sh | bash`.
|
||||
1. Install LURE. This can be done with the following command: `curl https://www.elara.ws/lure.sh | bash`.
|
||||
2. Check to make sure LURE is properly installed by running `lure ref`.
|
||||
3. Run `lure in itgui`. This process may take a while as it will compile `itgui` from source and package it for your distro.
|
||||
4. Once the process is complete, you should be able to open and use `itgui` like any other app.
|
||||
|
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"path/filepath"
|
||||
|
||||
"time"
|
||||
|
||||
"go.elara.ws/infinitime"
|
||||
|
3
music.go
3
music.go
@@ -20,7 +20,6 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
|
||||
"go.elara.ws/infinitime"
|
||||
"go.elara.ws/itd/mpris"
|
||||
@@ -55,7 +54,7 @@ func initMusicCtrl(ctx context.Context, wg WaitGroup, dev *infinitime.Device) er
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done("musicCtrl")
|
||||
|
@@ -25,7 +25,6 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"time"
|
||||
|
||||
"go.elara.ws/drpc/muxserver"
|
||||
|
12
weather.go
12
weather.go
@@ -9,7 +9,6 @@ import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"time"
|
||||
|
||||
"go.elara.ws/infinitime"
|
||||
@@ -86,9 +85,12 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
|
||||
go func() {
|
||||
defer wg.Done("weather")
|
||||
for {
|
||||
_, ok := <-ctx.Done()
|
||||
if !ok {
|
||||
return
|
||||
select {
|
||||
case _, ok := <-ctx.Done():
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
// Attempt to get weather
|
||||
@@ -257,7 +259,7 @@ func getWeather(ctx context.Context, lat, lon float64) (*METResponse, error) {
|
||||
}
|
||||
|
||||
// Set identifying user agent as per NMI requirements
|
||||
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", version))
|
||||
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", strings.TrimSpace(version)))
|
||||
|
||||
// Perform request
|
||||
res, err := http.DefaultClient.Do(req)
|
||||
|
Reference in New Issue
Block a user