Crate wallswitch

Source

Structs§

Arguments
Command line arguments
Config
Configuration variables
Dimension
Dimension - width and length - of an image.
DimensionError
Dimension Error
Environment
Environment variables
FileInfo
Image information
Monitor
Monitor properties
SliceDisplay
Implement fmt::Display for Slice [T]

Enums§

Orientation
Orientation: Horizontal or Vertical.
WSError
WallSwitch Error enum

Statics§

ENVIRON
Get environment variables

Traits§

Colors
Countable
Trait for counting the number of chars
FileInfoExt
FileInfo Extension
FloatIterExt
Find the maximum value of Vec<f64>.
IntegerIterExt
Find the maximum value of Vec<u32>.
PrintWithSpaces
Print Extension with Debug
ResultExt
Result Extension
U8Extension
u8 Extension

Functions§

display_files
Display found images
exec_cmd
Executes the command as a child process, waiting for it to finish and collecting all of its output.
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 hash from Path.
get_images
Get unique and random images/figures
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_v2
Generate a random integer value in the given range (min, max) inclusive.
get_wallpaper_path
default wallpaper path: “/home/user_name/wallswitch.jpg”
kill_other_instances
Killing the previous instances of wallswitch before running
rand
Generate random numbers without external dependencies
read_config_file
Read config file path: “/home/user_name/.config/wallswitch/wallswitch.json”
set_wallpaper
Set desktop wallpaper
show_initial_msgs
Show initial messages
shuffle
Shuffle the vector in place with the Fisher-Yates algorithm.
split_str
Split string into two numbers
update_images
Update FileInfo images with dimension information
where_is
Locate the binary path for a command

Type Aliases§

MyError
MyResult