aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarvey Tindall <hrfee@protonmail.ch>2020-11-26 19:11:38 +0000
committerHarvey Tindall <hrfee@protonmail.ch>2020-11-26 19:11:38 +0000
commit9b02fc285119ce140bbc6aa64936cc6fc6165cd1 (patch)
tree9798f25c23540f875377e3cc31cd2f223d39d77c
parenta84ae6bd5b02aac902b8e335927cd5c1cb3261a1 (diff)
downloadwaybar-mpris-9b02fc285119ce140bbc6aa64936cc6fc6165cd1.tar.gz
waybar-mpris-9b02fc285119ce140bbc6aa64936cc6fc6165cd1.zip
print clone message to stderr
any non-json output at all seems to break waybar now, so this avoids it.
-rw-r--r--main.go4
-rwxr-xr-xwaybar-mprisbin1005644 -> 1005684 bytes
2 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index f6caaee..0dc56fa 100644
--- a/main.go
+++ b/main.go
@@ -450,8 +450,8 @@ func main() {
}
} else if conn, err := net.Dial("unix", SOCK); err == nil {
// When waybar-mpris is already running, we attach to its output instead of launching a whole new instance.
-
- fmt.Println("waybar-mpris is already running. This instance will clone its output.")
+ // Print to stderr to avoid errors from waybar
+ os.Stderr.WriteString("waybar-mpris is already running. This instance will clone its output.")
if err != nil {
log.Fatalln("Couldn't dial:", err)
}
diff --git a/waybar-mpris b/waybar-mpris
index ec8ba5d..460833c 100755
--- a/waybar-mpris
+++ b/waybar-mpris
Binary files differ