Skip to content

Commit

Permalink
Remove TTY detection
Browse files Browse the repository at this point in the history
  • Loading branch information
9ary committed Nov 30, 2018
1 parent db2563e commit 6284178
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
14 changes: 1 addition & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[package]
name = "shotgun"
description = "Minimal X screenshot utility"
version = "1.2.0"
version = "2.0.0"
authors = ["Dan Elkouby <streetwalkermc@gmail.com>"]
license = "MPL-2.0"
repository = "https://github.com/neXromancers/shotgun"
build = "build.rs"

[dependencies]
getopts = "0.2"
isatty = "0.1"
libc = "0.2"
time = "0.1"

Expand Down
7 changes: 1 addition & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use image::GenericImage;
use image::Pixel;
use image::RgbaImage;
use image::Rgba;
extern crate isatty;
extern crate libc;
extern crate time;
extern crate x11;
Expand Down Expand Up @@ -166,11 +165,7 @@ fn run() -> i32 {
let ts_path = format!("{}.png", time::get_time().sec);
let path = match matches.free.get(0) {
Some(p) => p,
None => if !isatty::stdout_isatty() {
"-"
} else {
ts_path.as_str()
},
None => ts_path.as_str(),
};

if path == "-" {
Expand Down

0 comments on commit 6284178

Please sign in to comment.