Giter VIP home page Giter VIP logo

i3lockr's Introduction

i3lockr

Distort a screenshot and run i3lock.

Requires i3lock >= 2.12

Quick start [Documentation]

Signed binary releases are availible on the releases page.
Make sure to verify the signature and hashes!

Or build it yourself:

git clone --depth=1 git://github.com/owenthewizard/i3lockr.git && cd i3lockr
cargo build --release # you may adjust features here
sudo strip -s target/release/i3lockr -o /usr/local/bin/i3lockr
# shell completions are in target/ you may wish to copy them
i3lockr --blur 25 -- --nofork --ignore-empty-password # use your favorite args

Screenshots

Without --blur screenshot without blur

With --blur=10 screenshot with blur 10

With --blur=25 screenshot with blur 25

i3lockr (since v1.0.0) is incredibly fast at all blur levels, try timing it yourself with time.

Coding Style

Obey rustfmt and Rust 2018 conventions, as well as clippy lints.

Contributing

Pull requests are always welcome.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the MIT License and the Apache License (Version 2.0).

Versioning

This project adheres to Semantic Versioning.

Changes are documented in the Changelog.

See the tags for available releases.

Authors

See the list of contributors.

License

See LICENSE-APACHE and LICENSE-MIT for details.

Acknowledgments

i3lockr's People

Contributors

owenthewizard avatar th3whit3wolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

i3lockr's Issues

Better Name

I'm not a super fan of the name i3lockr, and I plan to implement more features (e.g. wayland support) that diverge a bit from i3.

Icon doesn't show

Describe The Bug
A clear and concise description of what the bug is.

To Reproduce
I just ran

i3lockr -i ./icon.png

Expected Behavior
For the icon to show in the center

Screenshots
2022-04-26-005012_1920x1080_scrot

System Info:

  • distro: Volid linux
  • i3lock --version i3lock: version 2.13 Β© 2010 Michael Stapelberg
  • i3lockr --version i3lockr v1.0.0 compiled for 'x86_64-unknown-linux-gnu' at 1559054817 (Unknown Branch@Unknown Commit)

Additional context
I'm gonna try building from source...

Combine with suspend/hibernate?

Hi there!

Thanks for creating this project! I'm attempting to use this in place of i3lock but for some reason it doesn't seem to work when combining with commands for suspending and hibernating:

https://github.com/scrogson/dotfiles/blob/master/config/i3/config#L125-L138

It appears that the && systemctl suspend doesn't get run until after I unlock my screen.

I've tried this with i3lockr --invert && systemctl suspend and i3lockr --invert -- --nofork && systemctl suspend and both work as I've described above.

Any ideas how I can fix this?

AUR package for i3lockr?

Hey folks!

very cool project! Is it planned to have an own AUR package for Arch Linux? Would installing / updating it much easier.

Updates required for pkgsrc

Hello,

While i3lock is in pkgsrc already, I'd like to have i3lockr packaged also.

Currently building i3lockr on NetBSD using cargo fails with the following error:

Updating crates.io index
Updating git repository `https://github.com/owenthewizard/scrap`
Updating git repository `https://github.com/LoganDark/stackblur-iter`
...
Compiling scrap v0.6.0-owenthewizard (https://github.com/owenthewizard/scrap#21b9f233)
...
Compiling stackblur-iter v0.1.3 (https://github.com/LoganDark/stackblur-iter?branch=rayon#7996893e)
...
Compiling itertools v0.10.3
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin" VSLANG="1033" "cc" "-Wl,-R/usr/pkg/lib/libatomic" "-Wl,-L/usr/pkg/lib/libatomic" "-m64" "/tmp/rustcQnB9Gv/symbols.o" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f.i3lockr.ade0f1cbf37b0664-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps" "-L" "/home/pin/Downloads/i3lockr-1.2.0/target/release/build/miniz-sys-8915ba2743c71f8a/out" "-L" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib" "-Wl,-Bstatic" "/tmp/rustcQnB9Gv/libminiz_sys-5750fc446e9092ed.rlib" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib/libcompiler_builtins-c881afc69c2b540c.rlib" "-Wl,-Bdynamic" "-lxcb" "-lxcb" "-lxcb-shm" "-lxcb-randr" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-lpthread" "-lrt" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib" "-o" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1"
= note: ld: cannot find -lxcb: No such file or directory
ld: cannot find -lxcb: No such file or directory
ld: cannot find -lxcb-shm: No such file or directory
ld: cannot find -lxcb-randr: No such file or directory
ld: /home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f.i3lockr.ade0f1cbf37b0664-cgu.0.rcgu.o: in function `core::ptr::drop_in_place<scrap::common::x11::Capturer>':
i3lockr.ade0f1cbf37b0664-cgu.0:(.text._ZN4core3ptr49drop_in_place$LT$scrap..common..x11..Capturer$GT$17hd6c97e6ddc03c5b6E+0x44): warning: warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference


error: could not compile `i3lockr` (bin "i3lockr") due to 1 previous error

This could be patched fairly easily, however the problem is things are a bit out of date. Dependency scrap appears to be an inactive crate and stackblur-iter an archived crate. While it might technically be possible to work around this for now, things will be broken in the near future.

I think its safe to say you can possibly assist in updating both i3lockr and scrap, and perhaps you might reach out to @LoganDark to request an update to stackblur-iter?

This wold be grately appreciated and would mean that i3lockr would be available in pkgsrc, and that would certainly be cool!

Thanks πŸ‘

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os

Same issue as this one.

The error is as follows:

➜ env RUST_BACKTRACE=1 i3lockr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:997:5
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: __libc_start_main
             at ../csu/libc-start.c:308
  14: <unknown>

I'm not quite sure how to compile with debug mode.

Don't encode PNG

If/when i3/i3lock#226 is merged we can avoid the time to encode raw bytes from the screenshot to PNG, which should save a significant amount of time.

Weird image artifacts with --icon on dual-monitor setup

Describe The Bug
When I have a second monitor plugged into my laptop, I get weird artifacts with --icon overlay.

To Reproduce
i3lockr --blur 20 -u lock-icon.png
with this png
lock

results in this weirdness
s

System Info:

  • Fedora 30, plain i3
    i3lock: version 2.12-3-gf6e0218 (2019-09-27, branch "master") Β© 2010 Michael Stapelberg
    i3lockr v1.0.0-final compiled for 'x86_64-unknown-linux-gnu' at 1569792999 (master@0cb4018)
  • Laptop with external monitor connected over DisplayPort, different resolution from laptop panel.
$ xrandr --listmonitors 
Monitors: 2
 0: +*DP-1 2560/677x1080/290+0+0  DP-1
 1: +eDP-1 1920/309x1080/173+0+1080  eDP-1

Additional context
The overlay is on the primary monitor, as desired.

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.