+23
-18
README.md
+23
-18
README.md
···
28
28
29
29
## Configuration
30
30
31
-
The applet currently does not have a graphical interface for setting the coordinates to fetch and display the temperature for a specific location. To set the current location, specify the latitude and longitude in the configuration files.
31
+
The applet includes a graphical configuration interface accessible by clicking on the weather icon in the panel. This opens a settings popup with multiple location options:
32
32
33
+
### Location Configuration Options
33
34
34
-
_Use IP-API web service (https://ip-api.com/docs/api:json) to retrieve approximate coordinates or alternatively, use mapping platforms like Google Maps to obtain accurate latitude and longitude._
35
+
**1. City Search with Fuzzy Matching**
36
+
- Type a city name in the "Search City" field
37
+
- Get real-time fuzzy-matched results from OpenStreetMap's Nominatim API
38
+
- Click on any result to automatically populate coordinates
39
+
- Examples: "new york", "portland", "tokyo"
35
40
41
+
**2. Automatic Location Detection**
42
+
- Click "Get Current Location" to automatically detect your location using IP geolocation
43
+
- Uses your public IP address to determine approximate coordinates
44
+
- Displays detected city and region information
36
45
37
-
```sh
38
-
cd ~/.config/cosmic/io.github.cosmic-utils.cosmic-ext-applet-weather/v1/
39
-
```
46
+
**3. Manual Coordinate Entry**
47
+
- Enter latitude and longitude values directly
48
+
- Useful for precise location specification
49
+
- Coordinates are validated when saved
40
50
41
-
Create and add latitude in the `latitude` file:
42
-
43
-
```
44
-
touch latitude
45
-
echo "12.123163" > latitude
46
-
```
47
-
48
-
Similarly for longitude:
51
+
### Temperature Unit
52
+
- Toggle between Celsius and Fahrenheit using the unit switcher
53
+
- Setting is saved and persists between app restarts
49
54
50
-
```
51
-
touch longitude
52
-
echo "23.811234" > longitude
53
-
```
55
+
### Saving Configuration
56
+
- Click "Save" to apply your location and temperature unit settings
57
+
- The weather data refreshes automatically every minute
58
+
- Configuration is stored in the system's configuration directory
54
59
55
-
The applet refreshes every minute, and the new coordinates will be used only at that time. As a workaround, simply remove and re-add the applet in the panel settings for an instant refresh.
60
+
All settings are saved automatically and persist between application restarts.
56
61
57
62
## Uninstall
58
63