ferrishot
takes a screenshot of the current desktop and creates a new window with background set to the taken screenshot.
Some pointers:
app.rs
holds theApp
struct which contains all information about the program.App::view
is the entry point for rendering of all the elements.message.rs
holdsMessage
enum which defines all events that can happen which mutate theApp
's state.App::update
responds to this.config/mod.rs
defines each config option. Make sure to also updatedefault.kdl
when modifying the config.
100% of the code is documented. To take advantage of that you can use cargo doc --document-private-items --open
.
On Windows and MacOS there are no dependencies.
On Linux, you will need these (apt
package manager names):
libgl-dev
libx11-dev
libxcbcommon-dev
If you use wayland you will also need libwayland-dev
lib.
For nix users, there is a flake.nix
which you can use with nix develop
.
To run:
cargo run
- Use
F12
to toggle the debug overlay which contains shows information about the state of ferrishot. - The
.explain()
method onElement
provided by theExplainer
trait will show a red border around an element and all of its children.
- The default log level is
error
. You can set a different log level using--log-level=<level>
or by specifying theRUST_LOG=<level>
env variable.- Levels:
error
,warn
,info
,debug
,trace
,off
.
- Levels:
- The logs get written into a file. You can see where with
ferrishot --print-log-file-path
or choose a custom one withferrishot --log-file
. - To write the logs to standard output use the
--log-stdout
argument.
index.html
is the landing page and served atferrishot.com
. You can just open this file in the browser>docs
is built usingmdbook serve
. It is served atferrishot.com/docs
.