$${\color{red}Waytrogen \space \color{lightblue}- \space \color{orange}Wallpaper\space setter\space for\space wayland}$$
X11
nitrogen. Written purely in the Rust
🦀 programming language.
- Recursive and lightning fast file searching
- Can load thousands of wallpapers with ease
- Supports images, GIFs and videos
- Supports external scripts when changing wallpapers
- Can list full wallpaper state in JSON format
- Fully supports:
hyprpaper
(hyprland - png, jpeg, webp, jxl)swaybg
(sway - png, jpeg, tiff, tga, gif)mpvpaper
(any video/image format with mpv config)swww
(jpeg, png, gif, pnm, tga, tiff, webp, bmp, farbfeld with transitions)
- Install required wallpaper changer(s) based on your needs:
hyprpaper
for Hyprlandswaybg
for Swaympvpaper
for video supportswww
for transition effects
- Install
waytrogen
:
- Launch via terminal:
waytrogen
- Restore previous wallpapers:
waytrogen --restore
orwaytrogen -r
- List current state in JSON:
waytrogen --list
orwaytrogen -l
- Use external script:
waytrogen --external_script
orwaytrogen -e
- Script receives: monitor, wallpaper path, complete state
- Cycle to the next wallpaper:
waytrogen --next
orwaytrogen -n
On NixOS, you can use the provided flake.nix
to compile and install from source. Just simply clone the repository using:
git clone https://github.com/nikolaizombie1/waytrogen.git && cd waytrogen
For those who would like to build from source on other distributions, the following dependencies are required:
- sqlite3 version 3.42 or greater
- openssl version 3.0 or greater
- gtk4 version 4.12 or greater
- gio-2.0 version 2.78 or greater
- glib-2.0 version 2.78 or greater
- meson version 1.2 or greater
- ninja version 1.10 or greater
- cargo version 1.75 or greater
On Arch use the following command to install the required build dependencies:
sudo pacman -S gtk4 sqlite openssl glib2 rust meson ninja
On Ubuntu use the following command to install the required build dependencies:
sudo apt install sqlite3 openssl libgtk-4-1 libglib2.0-dev cargo meson ninja-build
Then clone the repository using:
git clone https://github.com/nikolaizombie1/waytrogen.git && cd waytrogen
Configure meson and build using:
meson setup builddir --prefix=/usr && meson compile -C builddir
If you would like to install to your system, use:
meson install -C builddir
All help is welcome and appreciated for waytrogen
. If you would like to contribute to waytrogen
follow these steps:
- Create a fork of
waytrogen
by clicking thefork
button on the top of the github repository. - Clone your fork waytrogen:
git clone https://github.com/YOUR_USERNAME/waytrogen.git && cd waytrogen
- Create a branch who's name describe the changes you would like to do. Please be descriptive, do not use titles such as:
update-readme
orfix-bug
git switch --create descriptive-branch-name main
- Perform the changes you like to do.
-
If you want to add a new language to waytrogen, follow these steps:
- Install
gettext
On Arch Linux use:
sudo pacman -S gettext
On Ubuntu use:
sudo apt install gettext
On NixOS gettext is already installed.
- Run
cd po
- Add the language code you would like to add using a language code from here to the
LINGUAS
file. Keep the file ordered alphabetically. - Create the skeleton
po
file using the following command:
msginit -i waytrogen -o LL.po -l LL_CC.UTF8
Where
LL
is the language code used in the previous step andCC
is the country code can be obtained here- Modify the skeleton
po
the sections where it saysmsgstr ""
- Install
-
If you would like to do code changes, follow these steps:
- Install
waytrogen
either from source or from your package manager. This is to install the required schemas. Skip this step if developing on NixOS. - Install the required development dependencies:
On Arch Linux, use:
sudo pacman -S gtk4 sqlite openssl glib2 rust
On Ubuntu, use:
sudo apt install sqlite3 openssl libgtk-4-1 libglib2.0-dev cargo
On NixOS, add the following snippet to your
configuration.nix
programs.direnv = { enable = true; nix-direnv.enable = true; };
If the nix flake is not loading in properly, run
direnv allow
in the root of the repository to enable the flake.- Perform the changes you would like to do on
waytrogen
. - Compile and run
waytrogen
with the new changes using the following based on the distribution:
- If on
NixOS
simply run:
nix build && nix run
- On any other distribution, run:
cargo run --release
- Repeat steps 3 and 4 until you are satisfied with your changes.
- Install
-
- Run
cargo clippy
and make sure there are no suggestions. - Format the project using
cargo fmt --all
- Create a commit who's message describes your changes in slightly more detail.
- Go to your fork and create a pull request for
nikolaizombie1:waytrogen
on the main branch. If needed, go into detail what do your changes do in the description of the pull request.
Logo shape from Inconify Tabler atom.