dotfiles/.local/bin/set_wall_clock

18 lines
421 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
cd ~/Images/clocks/Traveler/
date="date -d now+1minute"
month=$($date +%-m)
day=$($date +%-d)
hour=$(( ($($date +%-H)%12)*5 + $($date +%-M)/12))
minute=$($date +%-M)
convert "bg.jpg" "month${month}.png" -composite "day${day}.png" -composite "hour${hour}.png" -composite "minute${minute}.png" -composite "/tmp/output.png"