forked from Elara6331/itd
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 395cded975 | |||
| 254b675f2c | |||
| 669788034f | |||
| ac7c626f56 | |||
| 1c623051ec | |||
| cec539f85b |
@@ -14,6 +14,7 @@ builds:
|
|||||||
- amd64
|
- amd64
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
|
- riscv64
|
||||||
goarm:
|
goarm:
|
||||||
- 7
|
- 7
|
||||||
- id: itctl
|
- id: itctl
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -6,6 +6,8 @@
|
|||||||
[](https://ci.elara.ws/Elara6331/itd)
|
[](https://ci.elara.ws/Elara6331/itd)
|
||||||
[](https://aur.archlinux.org/packages/itd-git/)
|
[](https://aur.archlinux.org/packages/itd-git/)
|
||||||
[](https://aur.archlinux.org/packages/itd-bin/)
|
[](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
|
#### 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 `./`.
|
- 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`
|
- Example: `sudo apt install ~/Downloads/itd-0.0.7-linux-aarch64.deb`
|
||||||
|
|
||||||
#### Fedora
|
#### 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.
|
- 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`
|
- Example: `sudo dnf install ~/Downloads/itd-0.0.7-linux-aarch64.rpm`
|
||||||
|
|
||||||
#### Alpine (and postmarketOS)
|
#### 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.
|
- 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`
|
- 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
|
#### 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:
|
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`.
|
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.
|
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. Once the process is complete, you should be able to open and use `itgui` like any other app.
|
||||||
|
|||||||
1
main.go
1
main.go
@@ -27,7 +27,6 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.elara.ws/infinitime"
|
"go.elara.ws/infinitime"
|
||||||
|
|||||||
3
music.go
3
music.go
@@ -20,7 +20,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
|
||||||
"go.elara.ws/infinitime"
|
"go.elara.ws/infinitime"
|
||||||
"go.elara.ws/itd/mpris"
|
"go.elara.ws/itd/mpris"
|
||||||
@@ -55,7 +54,7 @@ func initMusicCtrl(ctx context.Context, wg WaitGroup, dev *infinitime.Device) er
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done("musicCtrl")
|
defer wg.Done("musicCtrl")
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.elara.ws/drpc/muxserver"
|
"go.elara.ws/drpc/muxserver"
|
||||||
|
|||||||
12
weather.go
12
weather.go
@@ -9,7 +9,6 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.elara.ws/infinitime"
|
"go.elara.ws/infinitime"
|
||||||
@@ -86,9 +85,12 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg.Done("weather")
|
defer wg.Done("weather")
|
||||||
for {
|
for {
|
||||||
_, ok := <-ctx.Done()
|
select {
|
||||||
if !ok {
|
case _, ok := <-ctx.Done():
|
||||||
return
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to get weather
|
// 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
|
// 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
|
// Perform request
|
||||||
res, err := http.DefaultClient.Do(req)
|
res, err := http.DefaultClient.Do(req)
|
||||||
|
|||||||
Reference in New Issue
Block a user