Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Change the wallpaper according to time of day
- TIME=$(date +"%H")
- FOLDER='/home/alecz/8BitDay'
- BGCMD='nitrogen --set-zoom-fill'
- export DISPLAY=:0 # run "env | grep DISPLAY"
- case ${TIME} in
- 0[5-7]) $BGCMD "${FOLDER}/2 - Morning.png" ;;
- 0[8-9]|10) $BGCMD "${FOLDER}/3 - Late Morning.png" ;;
- 1[1-3]) $BGCMD "${FOLDER}/4 - Afternoon.png" ;;
- 1[4-6]) $BGCMD "${FOLDER}/5 - Late Afternoon.png" ;;
- 1[7-9]|20) $BGCMD "${FOLDER}/6 - Evening.png" ;;
- 21) $BGCMD "${FOLDER}/7 - Late Evening.png" ;;
- 2[2-3]) $BGCMD "${FOLDER}/8 - Night.png" ;;
- 0[0-4]) $BGCMD "${FOLDER}/9 - Late Night.png" ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement