weather:
type: "yasb.weather.WeatherWidget"options:
label: "<span>{icon}</span> {temp}"label_alt: "{location}: Min {min_temp}, Max {max_temp}, Humidity {humidity}"api_key: "3bf4cf9a7c3f40d6b31174128242807"# Get your free API key from https://www.weatherapi.com/show_alerts: trueupdate_interval: 600# Update interval in seconds, Min 600 secondshide_decimal: trueunits: "metric"# Can be 'metric' or 'imperial'location: "Los Angeles, CA, USA"# You can use "USA Los Angeles 90006" {COUNTRY CITY ZIP_CODE}, or just city.callbacks:
on_left: "toggle_card"on_middle: "do_nothing"on_right: "toggle_label"icons:
sunnyDay: "\ue30d"clearNight: "\ue32b"cloudyDay: "\udb81\udd99"cloudyNight: "\ue311"rainyDay: "\udb81\ude7e"rainyNight: "\udb81\ude7e"snowyIcyDay: "\udb81\udd98"snowyIcyNight: "\udb81\udd98"blizzard: "\uebaa"default: "\uebaa"weather_card:
blur: Trueround_corners: Trueround_corners_type: "normal"border_color: "System"alignment: "right"direction: "down"icon_size: 64label_shadow:
enabled: truecolor: "black"radius: 3offset: [ 1, 1 ]
Description of Options
label: The format string for the weather label. You can use placeholders like {temp}, {min_temp}, {max_temp}, {feelslike}, {location}, {humidity}, {icon}, {conditions}, {wind}, {wind_dir}, {wind_degree}, {pressure}, {precip}, {uv}, {vis}, {cloud}.
label_alt: The alternative format string for the weather label. Useful for displaying additional weather details.
update_interval: The interval in seconds to update the weather data. Must be between 60 and 36000000.
hide_decimal: Whether to hide the decimal part of the temperature.
location: The location for which to fetch the weather data. You can use example "USA Los Angeles 90006" {COUNTRY CITY ZIP_CODE}, or just city. Location can be set to env, this means you have to set YASB_WEATHER_LOCATION in environment variable or you can set it directly in the configuration file.
api_key: The API key for accessing the weather service. You can get free API key weatherapi.com. API key can be set to env, this means you have to set YASB_WEATHER_API_KEY in environment variable or you can set it directly in the configuration file.
show_alerts: Whether to show weather alerts.
units: The units for the weather data. Can be 'metric' or 'imperial'.
icons: A dictionary of icons for different weather conditions sunnyDay, sunnyNight, clearDay, clearNight, cloudyDay, cloudyNight, rainyDay, rainyNight, snowyIcyDay, snowyIcyNight, blizzard, default.
weather_card: Configuration for the weather card popup display. Controls visibility, appearance, and positioning.
blur: Enable blur effect for the weather card.
round_corners: Enable round corners for weather card.
round_corners_type: Border type for weather card can be normal and small. Default is normal.
border_color: Border color for weather card can be None, System or Hex Color"#ff0000".
alignment: Alignment of the weather card. Possible values are left, center, and right.
direction: Direction of the weather card. Possible values are up and down.
offset_top: Offset from the top of the widget in pixels.
offset_left: Offset from the left of the widget in pixels.
icon_size: Size of the weather icon in pixels.
callbacks: A dictionary specifying the callbacks for mouse events. The keys are on_left, on_middle, and on_right, and the values are the names of the callback functions.
animation: A dictionary specifying the animation settings for the widget. It contains three keys: enabled, type, and duration. The type can be fadeInOut and the duration is the animation duration in milliseconds.
container_padding: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.