Structs§
- Arguments
- Command line arguments
- Awww
Backend - Cache
Entry - Represents cached information of a file to prevent re-hashing and re-probing
- Config
- Configuration variables
- Dimension
- Dimension - width and length - of an image.
- Environment
- Environment variables and system metadata.
- File
Info - Image information
- Gnome
Backend - Hyprland
Backend - Monitor
- Monitor properties
- Openbox
Backend - Slice
Display - Implement fmt::Display for Slice
[T] - 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 - Orientation
- Orientation: Horizontal or Vertical.
- Sort
Criteria - Wall
Switch Error - WallSwitch Error enum
Constants§
Traits§
- Colors
- Concurrency
Ext - Trait to provide hardware-aware concurrency helpers for collections.
- Countable
- Trait for counting the number of chars
- File
Info Ext - FileInfo Extension
- 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§
- 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_
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
- get_
files_ from_ directory - Get all files into one vector.
- get_
hash - Calculates the BLAKE3 hash from Path.
- get_
images - Get unique and random images filtering against history
- get_
magick_ path - Get the magick binary path
- 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 - 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
- split_
str - Split string into two numbers
- update_
images - Update FileInfo images with dimension information safely and concurrently.
- where_
is - Locate the binary path for a command
Type Aliases§
- Wall
Switch Result - Result type to simplify function signatures.