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.

30 lines
813 B

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