Skip to content

delcourtfl/ferris-animated-wall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ferris Animated Wallpaper

Animated desktop companion, making Ferris the crab move across your screen and react to your scrolling and clicks.

ferris-animated-wall is a simple Rust application that spawns a transparent, borderless window on X11-based Linux desktops, rendering an animated Ferris crab that wanders across your screen, without affecting the interaction with the rest of the system.

This project was originally created as a first exploration of the Rust programming language, serving as a way to learn and better understand its ecosystem.

Playing with Ferris

Features

  • Create a new X11 window with given opacity and type (desktop vs dock)
  • Load the .png images
  • Communicate with the X11 server to get the relevant system information
  • Use the XFixes and Shape extensions extension to make the window click-through
  • Use the Shape extension to remove the background of the image
  • Use the XInput to catch raw button press events
  • Make the created image move randomly on click and in the direction of the cursor on scroll events

Installation & Usage

Prerequisites :

  • A Linux system with X11 server running. Shape / XFixes / XInput extensions are also needed.
  • Rust installed (with cargo package manager).

Installation steps :

  1. Clone the repository.
git clone https://github.com/delcourtfl/ferris-animated-wall.git
  1. Navigate to the project directory.
cd ferris-animated-wall/
  1. Build and run the project.
cargo run --release
# or with custom parameters:
cargo run --release -- --speed 50 --width 100 --opacity 120

Configuration Parameters

  • --width (u16, default: 120)
    The ouput width of the displayed image in pixels.

  • --height (u16, default: 120)
    The ouput height of the displayed image in pixels.

  • --alpha_threshold (u8, default: 200)
    The minimum alpha (transparency) value the image pixel must have to be visible.

  • --opacity (u8, default: 192)
    The opacity of the application window.

  • --speed (u16, default: 80)
    The speed at which the image moves to the cursor position.

  • --in_background (bool, default: false)
    If set to true, the window will stay behind all others (desktop/background mode).
    If false, the window stays on top (dock/overlay mode).

Technologies Used

  • Rust programming language.
  • x11rb for rust X11 bindings.
  • X11 server the X Window System for window management (client-server architecture).

Areas of Improvement

  • Support multiple animations / images at the same time.
  • Fetch and display messages (Xft over x11 core font as they are deprecated ?).
  • React to some user events.

License

MIT License

Acknowledgement

About

Animated Ferris desktop companion (Rust + X11)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages