Format code

This commit is contained in:
2025-09-04 18:02:53 +01:00
parent ea47f10b5c
commit c98cbe81ed

23
main.go
View File

@@ -5,7 +5,6 @@ import (
"encoding/xml" "encoding/xml"
"errors" "errors"
"fmt" "fmt"
_ "image/color"
"io" "io"
"log" "log"
"math/rand/v2" "math/rand/v2"
@@ -29,13 +28,9 @@ import (
"github.com/shreve/musicwand/pkg/mpris" "github.com/shreve/musicwand/pkg/mpris"
// xmpp - required // xmpp - required
_ "mellium.im/xmpp/disco"
"mellium.im/xmpp/jid" "mellium.im/xmpp/jid"
"mellium.im/xmpp/muc" "mellium.im/xmpp/muc"
_ "mellium.im/xmpp/stanza"
oasisSdk "pain.agency/oasis-sdk" oasisSdk "pain.agency/oasis-sdk"
// gui - optional
// catppuccin "github.com/mbaklor/fyne-catppuccin"
// TODO: integrated theme switcher // TODO: integrated theme switcher
) )
@@ -81,14 +76,14 @@ type CustomMultiLineEntry struct {
} }
func isUTF8Locale() bool { func isUTF8Locale() bool {
localeVars := []string{"LC_ALL", "LC_CTYPE", "LANG"} localeVars := []string{"LC_ALL", "LC_CTYPE", "LANG"}
for _, envVar := range localeVars { for _, envVar := range localeVars {
value := os.Getenv(envVar) value := os.Getenv(envVar)
if strings.Contains(strings.ToLower(value), "utf-8") { if strings.Contains(strings.ToLower(value), "utf-8") {
return true return true
} }
} }
return false return false
} }
func NewCustomMultiLineEntry() *CustomMultiLineEntry { func NewCustomMultiLineEntry() *CustomMultiLineEntry {
@@ -435,7 +430,7 @@ func main() {
notifications = config.Notifications notifications = config.Notifications
if isUTF8Locale() { if isUTF8Locale() {
replyBodyIcon = "↱" replyBodyIcon = "↱"
replyNameIcon = "→ " replyNameIcon = "→ "
} }