pub struct Arguments {
pub min_size: Option<u64>,
pub max_size: Option<u64>,
pub config: bool,
pub generator: Option<Shell>,
pub min_dimension: Option<u64>,
pub max_dimension: Option<u64>,
pub interval: Option<u64>,
pub monitor: Option<u8>,
pub monitor_orientation: Option<Orientation>,
pub pictures_per_monitor: Option<u8>,
pub sort: bool,
pub verbose: bool,
}Expand description
Command line arguments
Fields§
§min_size: Option<u64>Set a minimum file size (in bytes) for searching image files.
keep files whose size is greater than or equal to a minimum value.
size >= min_size
max_size: Option<u64>Set a maximum file size (in bytes) for searching image files.
keep files whose size is less than or equal to a maximum value.
size <= max_size
config: boolRead the configuration file and exit the program.
generator: Option<Shell>Generate shell completions and exit the program.
§How to generate shell completions for Z-shell:
§Example 1 (as a regular user):
Generate completion_derive.zsh file with:
wallswitch --generate=zsh > completion_derive.zsh
Append the contents of the completion_derive.zsh file to the end of completion zsh file.
ZSH completions are commonly stored in any directory listed in your $fpath variable.
On Linux, view $fpath variable with:
echo $fpath | perl -nE 'say for split /\s+/'
And then, execute:
compinit && zsh
§Example 2 (as a regular user):
Generate completions to rustup and wallswitch.
Visible to only the regular user.
mkdir -p ~/.oh-my-zsh/functions
rustup completions zsh > ~/.oh-my-zsh/functions/_rustup
wallswitch --generate=zsh > ~/.oh-my-zsh/functions/_wallswitch
compinit && zsh
§Example 3 (as root):
Generate completions to rustup, cargo and wallswitch.
Visible to all system users.
mkdir -p /usr/local/share/zsh/site-functions
rustup completions zsh > /usr/local/share/zsh/site-functions/_rustup
rustup completions zsh cargo > /usr/local/share/zsh/site-functions/_cargo
wallswitch --generate=zsh > /usr/local/share/zsh/site-functions/_wallswitch
compinit && zsh
See rustup completions for detailed help.
https://github.com/clap-rs/clap/blob/master/clap_complete/examples/completion-derive.rs
min_dimension: Option<u64>Set the minimum dimension that the height and width must satisfy.
width >= min_dimension && height >= min_dimension
Default value: min_dimension = 600.
max_dimension: Option<u64>Set the maximum dimension that the height and width must satisfy.
width <= max_dimension && height <= max_dimension
interval: Option<u64>Set the interval (in seconds) between each wallpaper displayed.
Default value: interval = 30 * 60 = 1800 seconds (30 minutes).
monitor: Option<u8>Set the number of monitors [default: 2]
monitor_orientation: Option<Orientation>Inform monitor orientation: Horizontal (side-by-side) or Vertical (stacked).
Orientation: [Horizontal, Vertical]
Default orientation: Horizontal.
pictures_per_monitor: Option<u8>Set number of pictures (or images) per monitor [default: 1]
Each monitor can have a diferent number of pictures (or images)
Gnome desktop only
sort: boolSort the images found.
verbose: boolShow intermediate runtime messages.
Show found images.
Show pid numbers of previous running program.
Implementations§
Trait Implementations§
Source§impl Args for Arguments
impl Args for Arguments
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Arguments
impl CommandFactory for Arguments
Source§impl FromArgMatches for Arguments
impl FromArgMatches for Arguments
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.