This allows you to create multi-layered parallax wallpapers.
Each layer moves with Your mouse cursor, creating this beautiful effect.
Installation • Configuration • Creating Wallpapers
a.mp4
Linux
- Install
SDL2
using Your package manager - If You are using
Wayland
, You also must installXWayland
- Download
.tar.gz
package from releases - Extract the content to
/
:
sudo tar -o -xvf [archive name].tar.gz --directory /
- Test Layered WallPaper by running
lwp
- Setting
reload_rootwindow=1
in config file may be necessary on some distributions for Layered WallPaper to work properly (see configuration) - To make Layered WallPaper run on startup, add
lwp &
command to Your desktop enviroment.rc
file
- Install
SDL2
using Your package manager. On some distributionsSDL2
doesn't contain development files, so it may be also necessary to install development version ofSDL2
- If You are using
Wayland
, You also must installXWayland
- Install
CMake
- Clone the repository and prepare a
build
directory:
git clone https://github.com/jankozik/parallax-wallpaper
cd lwp
mkdir build
cd build
- Compile the project and generate a
.tar.gz
package
cmake ../
cmake --build .
cpack
- Extract
.tar.gz
package
sudo tar -o -xvf [archive name].tar.gz --directory /
- Test Layered WallPaper by running
lwp
- Setting
reload_rootwindow=1
in config file may be necessary on some distributions for Layered WallPaper to work properly (see configuration) - To make Layered WallPaper run on startup, add
lwp &
command to Your desktop enviroment.rc
file
macOS
- Download and run the installer from releases
- Drag and drop Layered_WallPaper into Applications
- To make Layered WallPaper run on startup, run Toggle_Autorun.command
- To stop running Layered WallPaper on startup, run it again
- Install
SDL2
(homebrew:brew install sdl2
) - To build this project, You need to install
cmake
(homebrew:brew install cmake
) - Clone the repository:
git clone https://github.com/jankozik/parallax-wallpaper cd lwp
- Compile and generate installer
mkdir build cd build cmake ../ cmake --build . cpack -G DragNDrop
- DMG installer should appear, open it and drag Layered_WallPaper into Applications
- To make Layered WallPaper run on startup, run Toggle_Autorun.command
- To stop running Layered WallPaper on startup, run it again
Windows
- Download and run the installer from releases
- Layered WallPaper should run immediately after the installation
- Layered WallPaper is built using cmake, so You must install it.
- This project supports
MinGW
andMSVC
compilers. Using different one could lead to unpredicted behavior. If You want to useMSVC
, it should be installed with Visual Studio. - Download
SDL2
andSDL2-devel
package for Your compiler from SDL2 releases and extract them somewhere. - You also must install NSIS. It's required to build the installer, which is needed to correctly set the registry keys, that will make Layered WallPaper run on OS startup etc.
- Clone the repository and create
build
directory
git clone https://github.com/jszczerbinsky/lwp
cd lwp
mkdir -p build
cd build
- Type the following commands, replace square brackets elements with paths to extracted
SDL2
packages, that You've downloaded:
For MSVC
:
cmake -G "Visual Studio 17" -DSDL2_DIR=[PATH TO SDL2-MSVC-DEVEL DIRECTORY]\cmake -DSDL2_RUNTIME_DIR=[PATH TO SDL2 RUNTIME DIRECTORY] ../
cmake --build . --config Release
cpack
For MinGW
:
cmake -G "MinGW Makefiles" -DSDL2_DIR=[PATH TO SDL2-MINGW-DEVEL DIRECTORY]\cmake -DSDL2_RUNTIME_DIR=[PATH TO SDL2 RUNTIME DIRECTORY] -DCMAKE_BUILD_TYPE=Release ../
cmake --build .
cpack
- The installer should appear in
build
directory, that You've created earlier. After completing the installation Layered WallPaper should run immediately.
Linux
- Copy default config file to
.config/lwp/lwp.cfg
:
mkdir ~/.config/lwp
cp /etc/lwp.cfg ~/.config/lwp/lwp.cfg
macOS
- Copy default config file to
~/.config/lwp/lwp.cfg
:mkdir -p ~/.config/lwp cp /opt/lwp/lwp.cfg ~/.config/lwp/
Windows
- Press ⊞ Win + R
- Type
%appdata%
and pressOk
- Create new directory and name it
lwp
- Copy file
C:\Program Files\lwp\defaultWin.cfg
to directory created in the previous step and rename it tolwp.cfg
- Open
lwp.cfg
in notepad
- Do not put spaces between
=
and values - Do not leave trailing spaces
- Comments start with
#
- Do not put strings in quotation marks
Type | Name | Description |
---|---|---|
int | reload_rootwindow | Set this to 1 if You are using a compositor (linux only) |
float | smooth | Smooth movement multipler |
int | monitors | Monitors count |
int | monitor[n]_x | Position of nth monitor in X axis |
int | monitor[n]_y | Position of nth monitor in Y axis |
int | monitor[n]_w | Width of nth monitor |
int | monitor[n]_h | Height of nth monitor |
string | monitor[n]_wallpaper | Absolute path to the wallpaper directory |
int | monitor[n]_wallpaper_x | Position of the wallpaper relative to the monitor |
int | monitor[n]_wallpaper_y | Position of the wallpaper relative to the monitor |
int | monitor[n]_wallpaper_w | Wallpaper resolution |
int | monitor[n]_wallpaper_h | Wallpaper resolution |
int | target_fps | How many times per second should the wallpaper render (imprecise, hence "target") |
Parallax wallpapers are not popular. Because of this if You want some cool parallax wallpaper, You have to either find a parallax game background on the internet and use it as a wallpaper or cut some real wallpaper into layers using Gimp or Photoshop.
- Create a directory for Your wallpaper
- Save each layer to this directory as
.bmp
file and name them1.bmp
,2.bmp
... (1.bmp
is bottom most layer) - Create a wallpaper config file and name it
wallpaper.cfg
(You can make a copy fromC:\Program Files\lwp\wallpapers\default-fullhd\wallpaper.cfg
)
File structure:
C:
└ MyCoolWallpaperDirectory
└ wallpaper.cfg
└ 1.bmp
└ 2.bmp
└ 3.bmp
Type | Name | Description |
---|---|---|
int | count | Wallpaper layers count |
float | movement_x | Mouse sensitivity in X axis |
float | movement_y | Mouse sensitivity in Y axis |
float | movement[n]_x | Mouse sensitivity in X axis for nth layer (optional) |
float | movement[n]_y | Mouse sensitivity in Y axis for nth layer (optional) |
int | repeat_x | Repeat the wallpaper in X axis |
int | repeat_y | Repeat the wallpaper in Y axis |