aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.drone.yml26
-rw-r--r--.goreleaser.yml33
-rw-r--r--Dockerfile6
-rw-r--r--README.md2
-rw-r--r--go.mod5
-rw-r--r--go.sum7
-rwxr-xr-xwaybar-mprisbin1007212 -> 1006964 bytes
7 files changed, 76 insertions, 3 deletions
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..df30a58
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,26 @@
+name: waybar-mpris
+kind: pipeline
+type: docker
+
+steps:
+ - name: build
+ image: golang:latest
+ commands:
+ - apt install -y curl
+ - go mod download
+ - curl -sL https://git.io/goreleaser > goreleaser.sh
+ - chmod +x goreleaser.sh
+ - ./goreleaser.sh --snapshot --skip-publish --rm-dist
+ - wget https://builds.hrfee.pw/upload.py
+ - pip3 install requests
+ - bash -c 'python3 upload.py https://builds.hrfee.pw hrfee waybar-mpris ./dist/*.tar.gz'
+ environment:
+ BUILDRONE_KEY:
+ from_secret: BUILDRONE_KEY
+
+trigger:
+ branch:
+ - main
+ event:
+ exclude:
+ - pull_request
diff --git a/.goreleaser.yml b/.goreleaser.yml
new file mode 100644
index 0000000..01096fa
--- /dev/null
+++ b/.goreleaser.yml
@@ -0,0 +1,33 @@
+project_name: waybar-mpris
+release:
+ gitea:
+ owner: hrfee
+ name: waybar-mpris
+ name_template: "v{{.Version}}"
+before:
+ hooks:
+ - go mod download
+builds:
+ - dir: ./
+ env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ goarch:
+ - amd64
+ - arm
+ - arm64
+archives:
+ - replacements:
+ linux: Linux
+ amd64: x86_64
+checksum:
+ name_template: 'checksums.txt'
+snapshot:
+ name_template: "git-{{.ShortCommit}}"
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..9e5a2f7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,6 @@
+FROM golang:latest
+
+COPY . /opt/build
+
+RUN cd /opt/build && go build *.go
+
diff --git a/README.md b/README.md
index 87f376a..c874371 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ MPRIS2 is widely supported, so this component should work with:
## Install
`go get git.hrfee.pw/hrfee/waybar-mpris` will install the program, as well as the go dbus bindings and pflags for command-line arguments.
-or just grab the `waybar-mpris` binary from here and place it in your PATH.
+or download a precompiled binary from [here](https://builds2.hrfee.pw/view/hrfee/waybar-mpris).
## Usage
When running, the program will pipe out json in waybar's format. Add something like this to your waybar `config.json`:
diff --git a/go.mod b/go.mod
index 0b54c25..a360a50 100644
--- a/go.mod
+++ b/go.mod
@@ -3,11 +3,12 @@ module git.hrfee.pw/hrfee/waybar-mpris
go 1.15
require (
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/godbus/dbus/v5 v5.0.3
github.com/hpcloud/tail v1.0.0
- github.com/hrfee/mpris2client v0.0.0-20210108004725-d2a36745cc4a
+ github.com/hrfee/mpris2client v0.0.0-20210115213010-244c4cd6a569
github.com/spf13/pflag v1.0.5
- golang.org/x/sys v0.0.0-20201116194326-cc9327a14d48 // indirect
+ golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
)
diff --git a/go.sum b/go.sum
index da8938a..a9361e3 100644
--- a/go.sum
+++ b/go.sum
@@ -1,15 +1,22 @@
+github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/hrfee/mpris2client v0.0.0-20210108004725-d2a36745cc4a h1:3H1awMdF3eJBCg0QPpDtNW+ujQPvUCuLsqlMRoODMA4=
github.com/hrfee/mpris2client v0.0.0-20210108004725-d2a36745cc4a/go.mod h1:tVpzzAlsljmQevNA4mJwUy1onUUiaQcRAa4gdl37okY=
+github.com/hrfee/mpris2client v0.0.0-20210115213010-244c4cd6a569 h1:aCHzdXajnRUeaaW9FHzunrjGcRqmyFedwO0ODJRAdBk=
+github.com/hrfee/mpris2client v0.0.0-20210115213010-244c4cd6a569/go.mod h1:tVpzzAlsljmQevNA4mJwUy1onUUiaQcRAa4gdl37okY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200928205150-006507a75852 h1:sXxgOAXy8JwHhZnPuItAlUtwIlxrlEqi28mKhUR+zZY=
golang.org/x/sys v0.0.0-20200928205150-006507a75852/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201116194326-cc9327a14d48 h1:AYCWBZhgIw6XobZ5CibNJr0Rc4ZofGGKvWa1vcx2IGk=
golang.org/x/sys v0.0.0-20201116194326-cc9327a14d48/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 h1:nVuTkr9L6Bq62qpUqKo/RnZCFfzDBL0bYo6w9OJUqZY=
+golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
diff --git a/waybar-mpris b/waybar-mpris
index 8a574d7..2f73a56 100755
--- a/waybar-mpris
+++ b/waybar-mpris
Binary files differ