dotfiles/.local/bin/get_location.py
2025-05-28 18:33:04 +02:00

5 lines
226 B
Python

from gi.repository import Geoclue
clue = Geoclue.Simple.new_sync('something',Geoclue.AccuracyLevel.NEIGHBORHOOD,None)
location = clue.get_location()
print(location.get_property('latitude'), location.get_property('longitude'))