idk what git is doing to meeee
This commit is contained in:
parent
2124b44725
commit
c220ea2a16
1 changed files with 9 additions and 4 deletions
13
src/main.rs
13
src/main.rs
|
@ -25,16 +25,21 @@ fn become_wm<C: Connection>(conn: &C, screen: &Screen) -> anyhow::Result<()> {
|
|||
res.map_err(|e| anyhow!(e))
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
fn handle_args() {
|
||||
let mut args = std::env::args().skip(1);
|
||||
if let Some(arg) = args.next() {
|
||||
if arg != "-v" {
|
||||
return Err(anyhow!("usage: rswm [-v]"));
|
||||
eprintln!("usage: rswm [-v]");
|
||||
exit(1);
|
||||
} else {
|
||||
println!(env!("CARGO_PKG_VERSION")); // TODO: test this
|
||||
return Ok(());
|
||||
println!("rswm-{}", env!("CARGO_PKG_VERSION"));
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
handle_args();
|
||||
|
||||
// TODO: Investigate LC_CTYPE and Locale stuff from dwm
|
||||
|
||||
|
|
Loading…
Reference in a new issue