Structs§
- Arguments
- Command line arguments
- Aurora
Generator - Cosmic Aurora overlay generator.
- Awww
Backend - Cache
Entry - Represents cached information of a file to prevent re-hashing and re-probing
- Config
- Configuration variables
- Dimension
- Represents the physical dimensions (width and height) of an image.
- Environment
- Environment variables and system metadata.
- File
Info - Image information representing a wallpaper candidate.
- Fractal
Generator - Julia Fractal Generator and Image Post-Processor.
- Gnome
Backend - Hyprland
Backend - Monitor
- Monitor properties
- Openbox
Backend - Slice
Display - Star
- Helper representation of individual stars in a Starfield.
- Starfield
Generator - Cyberpunk Starfield / Bokeh effect generator.
- State
- Manages the Wallpaper History and the Smart Cache
- Swaybg
Backend - Xfce
Backend
Enums§
- Desktop
- Represents the supported Desktop Environments (DE) or Window Managers (WM). We use an Enum instead of a String to ensure type safety and prevent logic errors.
- Dimension
Error - Dimension Error enum definition
- File
Validation Error - Represents the explicit reasons why a candidate wallpaper file is invalid.
- Orientation
- Orientation: Horizontal or Vertical.
- Procedural
Effect - Represents the supported procedural background overlay effects.
- Sort
Criteria - Wall
Switch Error - WallSwitch Error enum
Constants§
Traits§
- Colors
- Concurrency
Ext - Trait to provide hardware-aware concurrency helpers for collections.
- Digit
Width - Extension trait to calculate the number of digits in an integer.
- File
Info Ext - Float
Iter Ext - Find the maximum value of
Vec<f64>. - Integer
Iter Ext - Find the maximum value of
Vec<u32>. - Print
With Spaces - Print Extension with Debug
- Random
Ext - Trait to extend slices with shuffling capabilities.
- U8Extension
- u8 Extension
- Wallpaper
Backend - Core trait defining the wallpaper application logic. Follows the “Functional Core, Imperative Shell” pattern.
Functions§
- compile_
wallpapers_ for_ monitors - Pre-processes and compiles separate multi-picture composite backgrounds in parallel for each monitor.
- compute_
hashes_ parallel - Computes the BLAKE3 hash of multiple files using a thread-safe parallel approach.
- detect_
monitors - Detects active outputs (monitors) using a robust fallback chain. Returns a WallSwitchResult wrapping a Vector of monitor property strings.
- display_
files - Display found images
- exec_
cmd - gather_
files - Gather the files with Smart Caching and Visual Deduplication
- get_
active_ xrandr_ monitors - Get active X11 monitors via xrandr to filter out stale configurations.
- get_
awww_ path - Get the ‘awww’ binary path, used by the generic Wayland backend.
- get_
config_ path - Config file path: “/home/user_name/.config/wallswitch/wallswitch.json”
- get_
directories - Default directories to search for images
- get_
feh_ path - Get the ‘feh’ binary path, used by the Openbox/X11 backend.
- get_
files_ from_ directory - Get all files into one vector.
- get_
hash - Calculates the BLAKE3 hash from any IO Reader stream.
- get_
images - Get unique and random images filtering against history
- get_
monitors - Get N monitors
- get_
random_ integer - Generate a random integer value in the given range (min, max) inclusive.
- get_
random_ integer_ safe - Generate a random integer value in the given range (min, max) inclusive.
- get_
wallpaper_ path - Default wallpaper path: “/home/user_name/wallswitch.jpg”
- is_
installed - Helper to check if a command exists in the system PATH.
- kill_
other_ instances - Killing the previous instances of
wallswitchbefore running - list_
all_ images - Displays images in a human-readable table format with sorting.
- list_
json_ cache - Lists the internal state cache as a filtered JSON object.
- parse_
hyprland - Pure parser for Hyprland output
- parse_
niri - Pure parser for Niri output
- parse_
wlr_ randr - Pure parser for wlr-randr output
- parse_
xfce - XFCE Logic: Matches active hardware (xrandr) with XFCE properties. If a monitor is active but has no XFCE property yet, we synthesize one.
- parse_
xrandr - probe_
image_ dimension - Probes image dimensions using pure-Rust in-process header scanning.
- prune_
stale_ xfce_ configs - rand
- Generate random numbers without external dependencies.
- read_
config_ file - Read config file path: “/home/user_name/.config/wallswitch/wallswitch.json”
- run
- Core application logic: coordinates arguments, state, and execution cycles.
- set_
wallpaper - Set desktop wallpaper based on the detected Desktop Environment.
- show_
initial_ msgs - Show initial messages
- update_
images - Update FileInfo images with dimension information safely and concurrently.
- where_
is - Locate the exact absolute path for a system binary.
Type Aliases§
- File
Validation Result - Wall
Switch Result - Result type to simplify function signatures.