1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! A simple wrapper for the `xdotool` command line tool.
//!
//! While I've tried my best documenting everything as detailed as possible, please look at the man page of `xdotool` for detailed information.
//!
//! # Examples
//!
//! ```
//!
//! ```
// TODO: Add examples
use Command;
use Output;
pub use OptionVec;
/// Execute a xdotool command.
/// This is the only function you actually need. Every other function is just for convenience.
/// However using the convenience functions is much more straight forward and therefore more desirable.
/// You should only use this function if there is no convenience function available.
///
/// # Examples
///
/// Search a window
///
/// ```
/// use std::io::Write;
///
/// use xdotool::{self, option_vec, OptionVec, window};
/// use xdotool::command::{self, options, sub_commands, Command};
///
/// let options = option_vec![options::SearchOption::Name];
/// let cmd = Command::Window(sub_commands::Window::Search(options));
/// let output = xdotool::run(cmd, "firefox");
/// std::io::stdout().write_all(&output.stdout).unwrap();
/// ```