Add Weather widget and integrate OpenWeatherMap API for dynamic updates
This commit is contained in:
@@ -35,6 +35,7 @@ func initWidgets(ctx context.Context, term *tcell.Terminal) {
|
||||
widgets.New("Clock", widgets.Clock()),
|
||||
widgets.New("Date", widgets.Date()),
|
||||
widgets.New("Calendar", widgets.Calendar()),
|
||||
widgets.New("Weather", widgets.Weather()),
|
||||
widgets.New("ChangeTitle", widgets.TextInput(titleUpdate, textinput.Label("Update Title: "), textinput.PlaceHolder("New Title"))),
|
||||
widgets.New("Wifi", widgets.WifiQRCode()),
|
||||
widgets.New("NetworkDevices", widgets.NetworkDevices()),
|
||||
@@ -104,6 +105,13 @@ func layout() []container.Option {
|
||||
),
|
||||
),
|
||||
grid.ColWidthPerc(25,
|
||||
grid.RowHeightFixed(20,
|
||||
grid.Widget(widgets.Get["Weather"],
|
||||
container.BorderTitle("Weather"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
grid.RowHeightPerc(25,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user