Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
621 B

4 years ago
4 years ago
4 years ago
  1. #!/bin/bash
  2. hour=$(date +"%H")
  3. morning=11
  4. afternoon=19
  5. cached=$(cat /tmp/day_cache)
  6. if [ $hour \< $morning ]; then
  7. if [ ! "$cached" = "night" ]; then
  8. feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-shack.jpg
  9. echo "night" > /tmp/day_cache
  10. fi
  11. elif [ $hour \> $afternoon ]; then
  12. if [ ! "$cached" = "afternoon" ]; then
  13. feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-sea.jpg
  14. echo "afternoon" > /tmp/day_cache
  15. fi
  16. else
  17. if [ ! "$cached" = "morning" ]; then
  18. feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-mountain.jpg
  19. echo "morning" > /tmp/day_cache
  20. fi
  21. fi