This commit is contained in:
2025-12-06 20:43:53 +01:00
parent 620777f3fb
commit d413b9de71
11 changed files with 634 additions and 74 deletions

View File

@@ -26,6 +26,7 @@
"custom/cava" = {
exec = "sh ~/.config/waybar/cava.sh";
format = "{} ";
on-click = "hyprctl dispatch focuswindow class:spotify";
};
wireplumber = {
@@ -141,16 +142,30 @@
};
"custom/nixicon" = {
format = "";
format = " ";
on-click = "rofi -show drun -theme $HOME/.config/rofi/custom.rasi";
tooltip = false;
};
"custom/weather" = {
format = "{}";
exec = "curl -s 'wttr.in/52.281311,10.527029?format=2'";
interval = 60;
tooltip = false;
return-type = "json";
exec = ''
curl -s -X GET "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=7c70fbfd89c7be3d5c8c552ec52064f8&units=metric&lang=en" | jq -c '{text: "\(.name) \(.main.temp)C°"}'
'';
interval = 120;
on-click = ''
data=$(curl -s -X GET "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=7c70fbfd89c7be3d5c8c552ec52064f8&units=metric&lang=en")
city=$(echo "$data" | jq -r '.name')
temp=$(echo "$data" | jq -r '.main.temp')
feels=$(echo "$data" | jq -r '.main.feels_like')
humidity=$(echo "$data" | jq -r '.main.humidity')
wind=$(echo "$data" | jq -r '.wind.speed')
clouds=$(echo "$data" | jq -r '.clouds.all')
sunrise=$(echo "$data" | jq -r '.sys.sunrise | strftime("%H:%M")')
sunset=$(echo "$data" | jq -r '.sys.sunset | strftime("%H:%M")')
notify-send "$city" "Temperature: $temp °C\nFeels Like: $feels °C\nHumidity: $humidity%\nWind: $wind m/s\nClouds: $clouds%\nSunrise at: $sunrise\nSunset at: $sunset" -u normal --icon="$HOME/Pictures/Avatar/avatar_weather_no_bg.png"
'';
};
"custom/weather-side" = {
@@ -180,6 +195,16 @@
on-click-right = "swaync-client -d -sw";
escape = true;
};
"custom/wallpaper" = {
format = "{} ";
exec = "basename $(swww query | grep -oP 'image: \\K.*')";
interval = 5;
on-click = "waypaper";
tooltip = true;
tooltip-format = "{}";
max-length = 30;
};
};
}