diff --git a/Dockerfile b/Dockerfile index 62066c1..06946e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,9 @@ RUN sudo apt-get update -y && sudo apt-get install -y\ libglu1-mesa-dev \ libx11-dev \ libimlib2-dev +ENV CFLAGS="-I /usr/include -I /usr/include/x86_64-linux-gnu -O3" + +# Install nanovg COPY . ./ diff --git a/README.md b/README.md index 1f39a24..0af413e 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,36 @@ -screenshot -========== +leanshot +======== Screenshot-capturing utility. Installation ------------ -Check out the releases page. +So far, only installation from crates.io is supported: + +``` +cargo install leanshot +``` + +Binary distributions will soon be available on the releases page. Example Integration ------------------- +It's nice to have a script like: + ```bash #!/bin/bash -SCREENSHOT=$HOME/.cargo/bin/screenshot -$SCREENSHOT $1 --clipboard --output "$HOME/Screenshots/Screenshot_%Y%m%d-%H:%M:%S.png" +SCREENSHOT=$HOME/.cargo/bin/leanshot +# choose some file to save it to +FILE="/path/to/screenshot.png" +$SCREENSHOT $1 -o $FILE +# optional: copy to clipboard +XCLIP=/usr/bin/xclip +$XCLIP -selection clipboard -t image/png -i $FILE ``` -Building from Source --------------------- - -First, clone this repository. Then, run - -``` -cargo build -``` - -Happy hacking! +Then, you can bind this script to the keybinds of your choice using your window manager's config. Contact ------- diff --git a/ci/run.sh b/ci/run.sh index a2d2075..f24aee9 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -26,7 +26,7 @@ case $1 in echo "Checking using rust-musl-builder" docker build -f Dockerfile -t build-"$2"-image . docker rm -f build-"$2" || true - docker run -it --name build-"$2" $VOLUMES build-"$2"-image bash -c 'cargo check --all' + docker run -it --name build-"$2" $VOLUMES build-"$2"-image bash -c 'cargo check -v --all' docker rm build-"$2" docker rmi build-"$2"-image ;; @@ -34,7 +34,7 @@ case $1 in echo "Building static binaries using rust-musl-builder" docker build -t build-"$2"-image . docker rm -f build-"$2" || true - docker run -it --name build-"$2" $VOLUMES build-"$2"-image bash -c 'cargo build --release --all' + docker run -it --name build-"$2" $VOLUMES build-"$2"-image bash -c 'cargo build --release -v --all' docker cp build-"$2":/home/rust/src/target/x86_64-unknown-linux-musl/release/"$2" "$2" docker rm build-"$2" docker rmi build-"$2"-image