/EarthLiveCPP

A CPP rewrite of EarthLiveShell

Primary LanguageShellGNU Lesser General Public License v3.0LGPL-3.0

EarthLiveCPP

A CPP rewrite of EarthLiveShell which is my shell script rewrite of EarthLiveSharp which is written in C# and windows-only.

Live view of the Earth from space, right on your (nix) desktop. Images are from the satellite himawari8, the only satellite (I know) that releases image of visible wavelength timely to public for free.

For a sneak peek for what this might be like, check EarthLiveShell.

Usage

Same as EarthLiveShell, use make && sudo make install. Be sure to stop and disable EarthLiveShell before you start this one.

Contributors

Rationale

The C# one can only run on windows, the shell implementation has performance constraints. For original purpose, check EarthLiveShell.

Libraries used

  • boost/filesystem dev files
  • boost/system dev files
  • curl dev files
  • imagemagick binaries (not linked but via external call)
  • zenity
  • msgfmt

Feature list

Control part:

Program invoked:

  • Obtain settings from configuration files.
  • Check if it is auto started i.e. start on boot / login.
  • if yes, directly invoke bachground process.
  • if no, show control interface, when user can start / stop / change settings.

When invoking bachground process:

  • Save user's original wallpaper settings if current wallpaper is not our dear planet Earth.
  • Set wallpaper
  • daemonize bachground process with parameters of refresh interval and image resolution ratio.

When user clicked stop:

  • restore user's original wallpaper
  • kill background process

When user changed a settings:

  • writes new settings to configuration file
  • restart background process
Background process part:
  1. Obtain refresh interval and resolution ratio from command line.
  2. Check if there is a update released.
  3. if no, go to 7.
  4. if yes, download image tiles
  5. if there is multiple tiles, stitch them together with imagemagick.
  6. update the image.
  7. wait until next refresh interval.