dotfiles/.local/bin/set_wall_clock

19 lines
477 B
Text
Raw Normal View History

2022-08-13 00:34:09 +02:00
#!/bin/bash -e
2020-05-12 18:25:43 +02:00
2022-08-13 00:34:09 +02:00
if [[ -f /tmp/output.png ]]
then
feh --no-fehbg --bg-center /tmp/output.png
fi
2020-05-12 18:25:43 +02:00
2023-04-14 18:17:25 +02:00
cd ~/Images/clocks/Current/
2020-05-12 18:25:43 +02:00
date="date -d now+1minute"
month=$($date +%-m)
day=$($date +%-d)
2023-04-14 18:17:25 +02:00
weekday=$($date +%-u)
2020-05-12 18:25:43 +02:00
hour=$(( ($($date +%-H)%12)*5 + $($date +%-M)/12))
minute=$($date +%-M)
2023-04-14 18:17:25 +02:00
convert "bg.jpg" "month${month}.png" -composite "day${day}.png" -composite "weekday${weekday}.png" -composite "hour${hour}.png" -composite "minute${minute}.png" -composite "/tmp/output.png"