Giter Site home page Giter Site logo

birdy's Introduction

github crates.io docs.rs build status

Screenshot tool for Linux.
Supports both X11 and Wayland.

People told me that it also works on Windows and partially on MacOS.
Since I'm not using neither MacOS or Windows at all there are no any guarantees related to these platforms.
If you want to add a support for MacOS or Windows - PRs are welcome.

image info

Installation

cargo install birdy --locked

Usage

Quic start

Currently it can be run only through "birdy" executable(from terminal, app launcher(e.g. rofi), bound to a hotkey):

  # makes a screenshot of the selected area and saves it into clipboard
  birdy

  # makes a screenshot of the selected area with a custom drawn items color, from screen with id=1 and saves it into $HOME/Pictures
  birdy -b 0,255,0,255 -s 1 -d $HOME/Pictures

  # e.g. sway
  sway bindsym $mod+Shift+p exec birdy

Help

birdy --help

Hotkeys while running (see lower for cli args):

Enter - take a screenshot of selected area, save to a clipboard and exit

f - take a screenshot where selected area is focused, save to a clipboard and exit

a - draw an arrow

z - draw a filled arrow

l - draw a line

r - draw a rectangular border

p - draw a filled rectangle

b - draw a blurred rectangle

t - draw a text

Tab - toggle latest drawn shape between filled/not filled states

Esc - exit

Usage: birdy [OPTIONS]

Options:
  -b, --border-color <BORDER_COLOR>
          

  -s, --screen <SCREEN>
          

  -d, --dir <DIR>
          save directory

  -c, --clipboard
          save to clipboard instead of path

  -h, --help
          Print help (see a summary with '-h')

birdy's People

Contributors

kakoc avatar dmirauta avatar

Stargazers

Matthias Fauconneau avatar Zai-Chun Chen avatar Tom avatar  avatar Caolan Leatham-Orrell  avatar  avatar  avatar Aarrayy avatar Fausto Núñez Alberro avatar Sant Raj avatar Finlay Small avatar  avatar Tuan Anh Tran avatar arun avatar Yash Raj avatar Nikolai Skvortsov avatar Oleg Senchenko avatar kel avatar Aditya Kresna Permana avatar  avatar  avatar  avatar Gelven avatar  avatar Eugene Lebedev avatar Stipe Kotarac avatar Dimev avatar

Watchers

Matthias Fauconneau avatar  avatar  avatar

Forkers

dmirauta

birdy's Issues

Feature request: multi-blur

It would be great to have blur feature to mask sensitive content.

Also I would suggest to do multi-blur effect, not just once.
Security experts introduced method how to recover text after blur.

Usually I do multiple blur over sensitive information, but I do it manually.

Thank you for your project :)

Panicked because of "index out of bounds: the len is 14729604 but the index is 14735352"

$ RUST_BACKTRACE=1 birdy
thread 'main' panicked at /home/chz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/birdy-0.1.7/src/rectangle.rs:43:17:
index out of bounds: the len is 14729604 but the index is 14735352
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
   1: core::panicking::panic_fmt
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
   2: core::panicking::panic_bounds_check
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:162:5
   3: birdy::rectangle::draw_rect_filled
   4: birdy::Screenshot::draw
   5: birdy::main::{{closure}}
   6: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
   7: winit::platform_impl::platform::x11::EventLoop<T>::run
   8: winit::platform_impl::platform::EventLoop<T>::run
   9: birdy::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

FYI:

  • cargo install birdy
  • Arch Linux
  • X11
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • rustc 1.73.0

Strange behavior when using text mode

After compiling manually, I was just playing around with birdy. I really like the simplicity of birdy (it's not noisy).

When entering text mode there is a strange behavior: Dots are added randomly while typing (I guess), see screenshot (I did type test this example).
Furthermore, there are letters and numbers available but no special signs like !@#$%^&*()_

image

Does not work correctly in hyprland (Wayland)

I installed birdy via cargo as it has not been packaged in the AUR yet. In hyprland it installs fine but when I run it, it appears to grab an image for selection, but the cursor does nothing. Perhaps I do not understand how to operate it?

Pressing ESC returns everything to normal.

                         ┌────────────────────────────────────────────────────────────┐
                         guru@ironforge
          A              └────────────────────────────────────────────────────────────┘
         ooo                                                        
        ooooo            ┌────────────────────────────────────────────────────────────┐
       ooooooo            OS -> ArcoLinux rolling x86_64
      ooooooooo          │ ├ -> 6.5.8-lqx1-1-lqx
     ooooo ooooo         │ ├󰏖 -> 1466 (pacman), 49 (flatpak), 5 (snap)
    ooooo   ooooo        │ └ -> fish 3.6.1
   ooooo     ooooo        DE/WM -> Hyprland (Wayland)
  ooooo  <oooooooo>      │ ├󰧨 -> sddm 0.20.0 (Wayland)
 ooooo      <oooooo>     │ ├󰀻 -> Papirus-Dark [GTK2/3]
ooooo          <oooo>    │ ├ -> kitty 0.30.1
                          PC -> B550I AORUS PRO AX
                         │ ├ -> AMD Ryzen 9 5950X (32) @ 5.08 GHz
                         │ ├﬙ -> AMD Radeon RX 6750 XT
                         │ ├ -> 32.54 GiB / 465.46 GiB (7%) - btrfs
                         │ ├ -> 689.90 GiB / 1.82 TiB (37%) - btrfs
                         │ ├ -> 2.22 TiB / 3.64 TiB (61%) - btrfs
                         │ ├ -> 4.64 TiB / 21.01 TiB (22%) - zfs
                         │ ├󰑭 -> 2.61 GiB / 62.75 GiB (4%)
                         │ ├󰓡 -> 0 B / 2.00 GiB (0%)
                         │ ├󰅐 -> 2 mins
                         │ └󰍹 -> 5120x1440 @ 120Hz
                          SND -> Komplete Audio 2 Analog Stereo (40%)
                         └────────────────────────────────────────────────────────────┘

Couldn't install via cargo

I tried to install birdy via cargo, but it failed:

>> cargo install birdy
    Updating crates.io index
  Downloaded birdy v0.1.8
  Downloaded 1 crate (303.7 KB) in 1.54s
  Installing birdy v0.1.8
    Updating crates.io index
  Downloaded xcursor v0.3.5
  Downloaded arboard v3.3.0
  Downloaded wl-clipboard-rs v0.8.0
  Downloaded gpu-descriptor-types v0.1.2
  Downloaded derive-new v0.5.9
  Downloaded gpu-descriptor v0.2.4
  Downloaded gethostname v0.3.0
  Downloaded profiling v1.0.14
  Downloaded pixels v0.13.0
  Downloaded tree_magic_mini v3.0.3
  Downloaded ab_glyph v0.2.23
  Downloaded xml-rs v0.8.19
  Downloaded weezl v0.1.8
  Downloaded slotmap v1.0.7
  Downloaded dbus v0.9.7
  Downloaded ultraviolet v0.9.2
  Downloaded indexmap v2.2.2
  Downloaded safe_arch v0.7.1
  Downloaded wide v0.7.15
  Downloaded xcb v1.3.0
  Downloaded ttf-parser v0.15.2
  Downloaded fontdue v0.7.3
  Downloaded smithay-client-toolkit v0.16.1
  Downloaded owned_ttf_parser v0.20.0
  Downloaded quick-xml v0.30.0
  Downloaded glow v0.12.3
  Downloaded wgpu v0.16.3
  Downloaded ttf-parser v0.20.0
  Downloaded x11rb v0.12.0
  Downloaded winit v0.28.7
  Downloaded x11rb-protocol v0.12.0
  Downloaded winit_input_helper v0.14.1
  Downloaded error-iter v0.4.1
  Downloaded screenshots v0.8.8
  Downloaded libdbus-sys v0.2.5
  Downloaded fastblur v0.1.1
  Downloaded 36 crates (5.0 MB) in 2.12s (largest was `libdbus-sys` at 1.6 MB)
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.78
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling pkg-config v0.3.29
   Compiling bitflags v1.3.2
   Compiling version_check v0.9.4
   Compiling smallvec v1.13.1
   Compiling once_cell v1.19.0
   Compiling quote v1.0.35
   Compiling libloading v0.8.1
   Compiling log v0.4.20
   Compiling syn v2.0.48
   Compiling bitflags v2.4.2
   Compiling dlib v0.5.2
   Compiling ahash v0.8.7
   Compiling thiserror v1.0.56
   Compiling simd-adler32 v0.3.7
   Compiling zerocopy v0.7.32
   Compiling xml-rs v0.8.19
   Compiling cc v1.0.83
   Compiling memoffset v0.6.5
   Compiling lock_api v0.4.11
   Compiling wayland-scanner v0.29.5
   Compiling bytemuck v1.14.1
   Compiling scoped-tls v1.0.1
   Compiling downcast-rs v1.2.0
   Compiling crc32fast v1.3.2
   Compiling memchr v2.7.1
   Compiling crossbeam-utils v0.8.19
   Compiling thiserror-impl v1.0.56
   Compiling scopeguard v1.2.0
   Compiling lazy_static v1.4.0
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.7.1
   Compiling num-traits v0.2.17
   Compiling allocator-api2 v0.2.16
   Compiling rustix v0.38.31
   Compiling hashbrown v0.14.3
   Compiling wayland-sys v0.29.5
   Compiling linux-raw-sys v0.4.13
   Compiling flate2 v1.0.28
   Compiling crossbeam-epoch v0.9.18
   Compiling rayon-core v1.12.1
   Compiling crossbeam-deque v0.8.5
   Compiling nix v0.24.3
   Compiling wayland-client v0.29.5
   Compiling fdeflate v0.3.4
   Compiling wayland-sys v0.31.1
   Compiling parking_lot_core v0.9.9
   Compiling arrayvec v0.7.4
   Compiling wayland-commons v0.29.5
   Compiling png v0.17.11
   Compiling wayland-backend v0.3.3
   Compiling slotmap v1.0.7
   Compiling indexmap v1.9.3
   Compiling memoffset v0.7.1
   Compiling termcolor v1.4.1
   Compiling quick-xml v0.31.0
   Compiling wayland-protocols v0.29.5
   Compiling libloading v0.7.4
   Compiling khronos-egl v4.1.0
   Compiling ash v0.37.3+1.3.251
   Compiling bit-vec v0.6.3
   Compiling either v1.9.0
   Compiling raw-window-handle v0.5.2
   Compiling unicode-width v0.1.11
   Compiling hashbrown v0.12.3
   Compiling codespan-reporting v0.11.1
   Compiling rayon v1.8.1
   Compiling bit-set v0.5.3
   Compiling wayland-scanner v0.31.1
   Compiling parking_lot v0.12.1
   Compiling spirv v0.2.0+1.5.4
   Compiling nix v0.25.1
   Compiling spin v0.9.8
   Compiling gpu-descriptor-types v0.1.2
   Compiling smithay-client-toolkit v0.16.1
   Compiling gpu-alloc-types v0.2.0
   Compiling arrayref v0.3.7
   Compiling unicode-xid v0.2.4
   Compiling xcursor v0.3.5
   Compiling pin-utils v0.1.0
   Compiling syn v1.0.109
   Compiling hexf-parse v0.2.1
   Compiling weezl v0.1.8
   Compiling vec_map v0.8.2
   Compiling ttf-parser v0.20.0
   Compiling rustc-hash v1.1.0
   Compiling strict-num v0.1.1
   Compiling equivalent v1.0.1
   Compiling indexmap v2.2.2
   Compiling tiny-skia-path v0.8.4
   Compiling naga v0.12.3
   Compiling calloop v0.10.6
   Compiling owned_ttf_parser v0.20.0
   Compiling wayland-cursor v0.29.5
   Compiling nix v0.26.4
   Compiling gpu-alloc v0.5.4
   Compiling gpu-descriptor v0.2.4
   Compiling flume v0.11.0
   Compiling wayland-client v0.31.2
   Compiling jpeg-decoder v0.3.1
   Compiling quick-xml v0.30.0
   Compiling libdbus-sys v0.2.5
   Compiling zune-inflate v0.2.54
   Compiling memmap2 v0.5.10
   Compiling wgpu-types v0.16.1
   Compiling x11-dl v2.21.0
   Compiling half v2.2.1
   Compiling renderdoc-sys v1.0.0
   Compiling glow v0.12.3
   Compiling minimal-lexical v0.2.1
   Compiling profiling v1.0.14
   Compiling color_quant v1.1.0
   Compiling fixedbitset v0.4.2
   Compiling ab_glyph_rasterizer v0.1.8
   Compiling bit_field v0.10.2
   Compiling cfg_aliases v0.1.1
   Compiling lebe v0.5.2
   Compiling exr v1.71.0
   Compiling winit v0.28.7
   Compiling ab_glyph v0.2.23
   Compiling petgraph v0.6.4
   Compiling wgpu-hal v0.16.2
   Compiling gif v0.12.0
   Compiling nom v7.1.3
   Compiling xcb v1.3.0
   Compiling tiff v0.9.1
   Compiling wayland-protocols v0.31.2
   Compiling tiny-skia v0.8.4
   Compiling aho-corasick v1.1.2
   Compiling qoi v0.4.1
   Compiling safe_arch v0.7.1
   Compiling x11rb v0.12.0
   Compiling byteorder v1.5.0
   Compiling regex-syntax v0.8.2
   Compiling percent-encoding v2.3.1
   Compiling fnv v1.0.7
   Compiling serde v1.0.196
   Compiling bytecount v0.6.7
   Compiling fastrand v2.0.1
   Compiling tempfile v3.9.0
   Compiling tree_magic_mini v3.0.3
   Compiling regex-automata v0.4.5
   Compiling image v0.24.8
   Compiling sctk-adwaita v0.5.4
   Compiling wide v0.7.15
   Compiling derive-new v0.5.9
   Compiling wayland-protocols-wlr v0.2.0
   Compiling wgpu-core v0.16.1
   Compiling x11rb-protocol v0.12.0
   Compiling serde_derive v1.0.196
   Compiling mio v0.8.10
   Compiling os_pipe v1.1.5
   Compiling gethostname v0.3.0
   Compiling instant v0.1.12
   Compiling static_assertions v1.1.0
   Compiling serde_json v1.0.113
   Compiling wgpu v0.16.3
   Compiling wl-clipboard-rs v0.8.0
   Compiling dbus v0.9.7
   Compiling ultraviolet v0.9.2
   Compiling regex v1.10.3
   Compiling is-terminal v0.4.10
   Compiling hashbrown v0.13.2
   Compiling ryu v1.0.16
   Compiling humantime v2.1.0
   Compiling itoa v1.0.10
   Compiling pollster v0.3.0
   Compiling ttf-parser v0.15.2
   Compiling pixels v0.13.0
   Compiling fontdue v0.7.3
   Compiling env_logger v0.10.2
   Compiling screenshots v0.8.8
   Compiling arboard v3.3.0
   Compiling winit_input_helper v0.14.1
   Compiling fastblur v0.1.1
   Compiling error-iter v0.4.1
   Compiling birdy v0.1.8
error[E0432]: unresolved import `screenshots::Screen`
  --> /home/censored/.cargo/registry/src/index.crates.io-6f17d22bba15001f/birdy-0.1.8/src/main.rs:20:5
   |
20 | use screenshots::Screen;
   |     ^^^^^^^^^^^^^^^^^^^ no `Screen` in the root

For more information about this error, try `rustc --explain E0432`.
error: could not compile `birdy` (bin "birdy") due to 1 previous error
error: failed to compile `birdy v0.1.8`, intermediate artifacts can be found at `/tmp/cargo-installNsfM2P`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Feature request: draw an arrow

It would be great to draw arrows with medium size lines.

May be with color option: red, green, green (this part for discussion).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.