Update readme and add package installation
This commit is contained in:
parent
074e8e4764
commit
c353c5892f
2 changed files with 24 additions and 1 deletions
14
README.md
14
README.md
|
@ -1 +1,15 @@
|
|||
## earth_wallpaper
|
||||
|
||||
### Description
|
||||
|
||||
Obtain an image of the planet earth centered over a city, with the night shadow according to the current time and overlay information about temperature and time.
|
||||
|
||||
|
||||
### Requirements
|
||||
|
||||
Tested with XFCE4 and Gnome 2. Problems with Gnome >3.
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
earth_wallpaper.sh Tampere
|
||||
```
|
||||
|
|
|
@ -120,7 +120,16 @@ temperature=$("${wget_cmd}" -q -O - "$weather_url" | egrep -o "<temp_c>-?[0-9]*\
|
|||
text="Image from $cur_date at $time\n$city $temperatureº C"
|
||||
convert_cmd=$(which convert)
|
||||
if [ ! -x "${convert_cmd}" ]; then
|
||||
if [ "$(which apt)" != "" ]; then
|
||||
apt install imagemagick
|
||||
elif [ "$(which yum)" != "" ]; then
|
||||
yum install imagemagick
|
||||
elif [ "${which pacman}" != "" ]; then
|
||||
pacman -S imagemagick
|
||||
else
|
||||
message "Install imagemagick using your package manager." p
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
run_and_log "${convert_cmd}" $wallpaper_file -pointsize 50 -font "${font_name}" -fill "#505050" -gravity SouthEast -annotate +0+0 "$text" $wallpaper_file
|
||||
error_code=$?
|
||||
|
|
Loading…
Reference in a new issue