Skip to content

Commit 7417fd7

Browse files
committed
New better everything! πŸŽ‰
Happy birthday Willow! πŸŽ‚
1 parent 2642386 commit 7417fd7

21 files changed

Lines changed: 1065 additions & 463 deletions

β€Ž.github/blur-0.pngβ€Ž

1.7 MB
Loading

β€Ž.github/blur-10.pngβ€Ž

885 KB
Loading

β€Ž.github/blur-25.pngβ€Ž

605 KB
Loading

β€Ž.github/invert.pngβ€Ž

-162 KB
Binary file not shown.

β€Ž.github/no-invert.pngβ€Ž

-170 KB
Binary file not shown.

β€ŽCargo.lockβ€Ž

Lines changed: 126 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€ŽCargo.tomlβ€Ž

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,35 @@
11
[package]
22
name = "i3lockr"
3-
version = "0.1.2"
3+
description = "Distort a screenshot and run i3lock"
4+
version = "1.0.0"
45
license = "MIT OR Apache-2.0"
5-
edition = "2018"
6-
repository = "https://github.com/owenthewizard/i3lockr"
7-
keywords = ["i3", "i3lock", "i3lockr", "i3lock-color", "lock"]
86
authors = ["Owen Walpole <owenthewizard@hotmail.com>"]
9-
description = "Distort a screenshot and run i3lock"
10-
publish = false
7+
repository = "https://github.com/owenthewizard/i3lockr"
8+
readme = "README.md"
9+
keywords = ["i3lockr", "i3lock", "i3lock-fancy", "blur", "i3lock-color" ]
10+
categories = ["command-line-utilities", "multimedia::images"]
11+
edition = "2018"
1112

1213
[dependencies]
13-
#font-loader = "0.7.0"
14-
libc = "0.2.46"
15-
16-
[dependencies.clap]
17-
version = "2.32.0"
18-
default-features = false
19-
features = ["yaml"]
20-
21-
#[dependencies.structopt]
22-
#version = "0.2.14"
23-
#default-features = false
14+
libc = "0.2" # should be same as xcb
15+
num_cpus = "1"
2416

25-
[dependencies.image]
26-
version = "0.21.0"
17+
[dependencies.structopt]
18+
version = "0.2"
2719
default-features = false
28-
features = ["png_codec"]
2920

3021
[dependencies.xcb]
31-
version = "0.8.2"
32-
default-features = false
33-
features = ["randr"]
22+
version = "0.8"
23+
features = ["randr", "shm"]
3424

35-
[dependencies.xcb-util]
36-
version = "0.2.0"
37-
default-features = false
38-
features = ["image"]
25+
[build-dependencies]
26+
cc = "1"
3927

40-
[profile.release]
41-
codegen-units = 1
42-
lto = "thin"
43-
44-
[profile.bench]
45-
codegen-units = 1
46-
lto = "thin"
28+
[features]
29+
suggestions = ["structopt/suggestions"]
30+
color = ["structopt/color"]
31+
default = ["suggestions", "color"]
4732

48-
[profile.dev]
49-
opt-level = 2
33+
[profile.release]
34+
lto = true
35+
codegen-units=1

β€ŽREADME.mdβ€Ž

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,63 @@
22

33
Distort a screenshot and run `i3lock`.
44

5-
## Quick Start [[Documentation]](USAGE.md)
5+
## Quick start [[Documentation]](USAGE.md)
66

7-
Signed binary releases are availible [here](https://github.com/owenthewizard/i3lockr/releases).
7+
Signed binary releases are availible on the [releases page](https://github.com/owenthewizard/i3lockr/releases).
88

9+
Or build it yourself:
910
```bash
1011
git clone --depth=1 git://github.com/owenthewizard/i3lockr.git && cd i3lockr
11-
cargo build --release
12-
sudo strip -s target/release/i3lockr /usr/local/bin/i3lockr
13-
i3lockr --invert -- --nofork --noempty # or your favorite args
12+
cargo build --release # you may adjust features here
13+
sudo strip -s target/release/i3lockr -o /usr/local/bin/i3lockr
14+
i3lockr --blur 25 -- --nofork --ignore-empty-password # use your favorite args
1415
```
1516

1617
## Screenshots
1718

18-
Without `--invert`
19-
![screenshot without --invert](.github/no-invert.png)
19+
Without `--blur`
20+
![screenshot without blur](.github/blur-0)
2021

21-
With `--invert`
22-
![screenshot with --invert](.github/invert.png)
22+
With `--blur=10`
23+
![screenshot with blur 10](.github/blur-10)
2324

24-
With the default options on a 1080p monitor, `i3lockr` takes less than half a second to run!
25+
With `--blur=25`
26+
![screenshot with blur 25](.github/blur-25)
27+
28+
`i3lockr` (since v1.0.0) is incredibly fast at all blur levels, try timing it yourself with `time`.
2529

2630
## Important Notes
2731

28-
The exit status of `i3lockr` is not reliable!
29-
That means that `i3lockr && systemctl suspend` may not lock the screen if there was an error.
32+
`i3lockr` always exits with `EXIT_SUCCESS`. This means that commands such as `i3lockr && systemctl suspend` may not lock the screen if there was an error.
3033

3134
### Coding Style
3235

3336
Obey `rustfmt` and Rust 2018 conventions.
3437

3538
## Contributing
3639

37-
Pull requests are always welcome. See [TODO](TODO.md).
40+
Pull requests are always welcome.
41+
42+
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).
3843

3944
## Versioning
4045

4146
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4247

4348
Changes are documented in the [Changelog](CHANGELOG.md).
4449

45-
See the [tags on this repository](https://github.com/owenthewizard/i3lockr/tags) for available releases.
50+
See the [tags](https://github.com/owenthewizard/i3lockr/tags) for available releases.
4651

4752
## Authors
4853

4954
See [the list of contributors](https://github.com/owenthewizard/i3lockr/contributors).
5055

5156
## License
5257

53-
`i3lockr` is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
54-
5558
See [LICENSE-APACHE](LICENSE-APACHE.md) and [LICENSE-MIT](LICENSE-MIT.md) for details.
5659

5760
## Acknowledgments
5861

59-
* [i3lock-fancy](https://github.com/meskarune/i3lock-fancy) by Dolores Portalatin for inspiration.
60-
* [Padlock Icon](padlock.svg) made by [Chanut](https://www.flaticon.com/authors/chanut) from [Flaticon](https://www.flaticon.com) is licensed by [CC 3.0 BY](https://creativecommons.org/licenses/by/3.0/).
62+
* [i3lock](https://github.com/i3/i3lock) by [Michael Stapelberg](https://github.com/stapelberg) and [contributers](https://github.com/i3/i3lock/graphs/contributors)
63+
* [i3lock-fancy](https://github.com/meskarune/i3lock-fancy) by [Dolores Portalatin](https://github.com/meskarune) for inspiration.
64+
* [Martin DΓΈrum](https://github.com/mortie) for contributions to `i3lock` that made this possible.

β€ŽTODO.mdβ€Ž

Lines changed: 0 additions & 5 deletions
This file was deleted.

β€ŽUSAGE.mdβ€Ž

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@
33
See the help:
44

55
```
6-
i3lockr v0.1.0 (unknown-branch@unknown-commit)
6+
i3lockr 1.0.0
77
Owen Walpole <owenthewizard@hotmail.com>
88
Distort a screenshot and run i3lock
99
1010
USAGE:
1111
i3lockr [FLAGS] [OPTIONS] [i3lock]...
1212
1313
FLAGS:
14-
-h, --help Prints help information
15-
--invert Draw the lock image as an invert mask on the background, i.e. invert every pixel on the background
16-
where the same pixel on the lock image has >50% alpha
17-
-V, --version Prints version information
14+
-v, --verbose Print how long each step takes, among other things. Always enabled in debug builds.
15+
-h, --help Prints help information
16+
--invert Interpret the icon as a mask, inverting masked pixels [NYI] on the screenshot. Try it to see an
17+
example.
18+
--one-icon Only place one icon. Default is to place an icon on each monitor. [NYI]
19+
-V, --version Prints version information
1820
1921
OPTIONS:
20-
-d, --dark <dark> Darkens image by an amount [default: -36]
21-
-g, --gravity <gravity> Text position [default: south] [possible values: north, east, south, west]
22-
-i, --iter <iter> Number of blur iterations [default: 1]
23-
-l, --lock <lock> Path to lock image
24-
-f, --scale <scale> Scale factor for faux-blur. Divisor of 1, so 5 == 20% [default: 2]
25-
-s, --strength <strength> Blur strength [default: 3]
26-
-t, --text <text> Text to draw on the screen [UNINPLEMENTED] [default: ]
22+
-i, --icon <file.png> Path to icon to overlay on screenshot. [NYI]
23+
-u, --position <coords|center> Icon placement, "center" to center, [NYI] "x, y" (from top-left), or "-x,-y" (from
24+
bottom-right). Has no effect without --icon. Example: "(945, -20)" [default:
25+
Center]
26+
-b, --blur <radius> Blur strength. Example: 10
2727
2828
ARGS:
29-
<i3lock>... Args to pass to i3lock
29+
<i3lock>... Arguments to pass to i3lock. '--' must be used. Example: "-- --nofork --ignore-empty-password"
3030
```
3131

32-
[default.png](default.png) is embedded into the executable at build-time as the default lock image.
32+
Items marked `[NYI]` are `Not Yet Implemented` and may function partially or not at all.

0 commit comments

Comments
Β (0)