renamed: music-notify -> bin/music-notify renamed: motd.sh -> mensa/motd.sh renamed: motdmb.sh -> mensa/motdmb.sh deleted: testing-wallpaper renamed: wallpaper-picker -> wallpaper/hyprland/wallpaper-picker new file: wallpaper/niri/README.md renamed: wallpaper-niri -> wallpaper/niri/wallpaper-niri new file: wallpaper/niri/wallpaper.rasi
23 lines
No EOL
927 B
Bash
23 lines
No EOL
927 B
Bash
## (install chafa) (Mensa of the Day mit Bildern)
|
|
function motd() {
|
|
mensen=(32) #(6 matrix, 25 zelt, 32 johanna)
|
|
for mensa in "${mensen[@]}"; do
|
|
curl -s https://api.studentenwerk-dresden.de/openmensa/v2/canteens/$mensa | jq -r .name
|
|
while read meal; do
|
|
name=$(echo "$meal" | awk -F '$' '{print $1}')
|
|
price=$(echo "$meal" | awk -F '$' '{print $2}')
|
|
image=$(echo "$meal" | awk -F '$' '{print $3}')
|
|
|
|
echo "$price € $name"
|
|
|
|
if [[ -n "$image" && "$image" != "null" ]]; then
|
|
curl -s "https:$image" | chafa --size=60x15
|
|
fi
|
|
|
|
done < <(curl -s https://api.studentenwerk-dresden.de/openmensa/v2/canteens/$mensa/days/$(date "+%Y-%m-%d")/meals \
|
|
| jq -r '.[] | "\(.name)$\(.prices.Studierende)$\(.image)$\(.notes)"' \
|
|
| grep -E "vegan|vegetarisch" \
|
|
| grep -v suppe)
|
|
done
|
|
}
|
|
motd |