mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
* feat: switch auto location in weather widget to use GeoClue2 instead of simple IP check * nix: enable GeoClue2 service by default * lint: fix line endings * fix: fall back to IP location if GeoClue is not available
15 lines
338 B
Go
15 lines
338 B
Go
package geolocation
|
|
|
|
import "github.com/AvengeMedia/DankMaterialShell/core/internal/log"
|
|
|
|
func NewClient() Client {
|
|
if geoclueClient, err := newGeoClueClient(); err != nil {
|
|
log.Warnf("Failed to initialize GeoClue2 client: %v", err)
|
|
} else {
|
|
return geoclueClient
|
|
}
|
|
|
|
log.Info("Falling back to IP location")
|
|
return newIpClient()
|
|
}
|