forked from michael/leanshot
update readme
This commit is contained in:
parent
ccb70d3328
commit
39d643a0cf
3 changed files with 24 additions and 17 deletions
|
@ -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 . ./
|
||||
|
||||
|
|
34
README.md
34
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
|
||||
-------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue