Giter VIP home page Giter VIP logo

wpaperd's Introduction

wpaperd

GitHub release (latest by date) GitHub license GitHub Workflow Status

wpaperd is a minimal wallpaper daemon for Wayland. It allows the user to choose a different image for each output (aka for each monitor) just as swaybg. Moreover, a directory can be chosen and wpaperd will randomly choose an image from it. Optionally, the user can set a duration, after which the image displayed will be changed with another random one.

Features

  • Choose your wallpaper for each input
  • Randomly choose an image from a directory
  • Change the random image after a set duration
  • Configurable via a TOML configuration file
  • Reload config at runtime and apply new settings
  • (optional) Apply a shadow on the top of the wallpaper

Getting started

Dependencies

wpaperd is written entirely in Rust and, other than the crates it depends on, it has the following dependencies:

  • pkg-config (build-time)
  • libxkbcommon

It does not depend on wayland-client C library, but it instead uses a Rust implementation.

Build

To install wpaperd, clone the repository and build the project:

$ git clone https://github.com/danyspin97/wpaperd
$ cd wpaperd
$ cargo build --release

Install

You can install wpaperd using cargo:

$ cargo install --path="."

Otherwise you can install it using rinstall:

# First generate the man page
$ scdoc < man/wpaperd-output.5.scd > man/wpaperd-output.5
$ rinstall -y

To run it, execute the wpaperd program:

$ wpaperd

If you want to automatically run it at startup, add this line to your sway configuration (located in $HOME/.config/sway/config) depending on your installation method:

# For installation using cargo
exec ~/.cargo/bin/wpaperd
# For installation using rinstall
exec ~/.local/bin/wpaperd

Images format support

wpaperd relies on the image crate for loading and dislaying images. By default it supports for the following formats:

  • jpeg
  • png
  • webp

Optionally, support for avif images can be enabled by adding its respective feature:

$ cargo build --release --features avif

Wallpaper Configuration

The wallpaper configuration file for wpaperd is located in XDG_CONFIG_HOME/wpaperd/wallpaper.toml (which defaults to $HOME/.config/wpaperd/wallpaper.toml) and is a TOML file. Each section represents a different output and contains the following keys:

  • path, path to the image/directory
  • duration, how much time the image should be displayed until it is changed with a new one. This is only valid when path points to a directory. (Optional)
  • apply-shadow, apply a shadow on the top part of the image, to work as a shadow effect of the status bar. This is particularly suited for window managers like sway. (Optional)

The section default will be used as fallback for the all the outputs that aren't listed in the config file. This is an example configuration:

[default]
path = "/home/danyspin97/Pictures/Wallpapers/"
duration = "30m"

[eDP-1]
path = "/home/danyspin97/Pictures/Wallpapers/github_octupus.png"
apply-shadow = true

If you're running sway, you can look for the available outputs and their ID by running:

$ swaymsg -t get_outputs

Every time you update the configuration while the program is running, the changes will be applied automatically.

TODO

wpaperd is still a work in progress. The next things to do, in order, are:

  • Configurable upscaling algorithm, right now Lanzcos3 is always used
  • Add different modes to apply the wallpaper, i.e. center, fit, original
  • Add IPC and a client to control wpaperd
  • Update smithay-client-toolkit to next version (still unreleased)

License

wpaperd is licensed under the GPL-3.0+ license.

wpaperd's People

Contributors

danyspin97 avatar 1995parham avatar mariojim avatar richard-rogalski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.