-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs]Introduce scdoc generation in rust build sys
Signed-off-by: Shinyzenith <[email protected]>
- Loading branch information
1 parent
20342a5
commit 08a4754
Showing
9 changed files
with
145 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
target | ||
*.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use std::{fs::read_dir, process::Command}; | ||
|
||
fn main() { | ||
let mut man_pages: Vec<(String, String)> = Vec::new(); | ||
for path in read_dir("./docs").unwrap() { | ||
let path = path.unwrap(); | ||
if path.file_type().unwrap().is_dir() { | ||
continue; | ||
} | ||
|
||
if let Some(file_name) = path.path().to_str() { | ||
let man_page_name = file_name.replace(".scd", ".gz"); | ||
man_pages.push((file_name.to_string(), man_page_name)); | ||
} | ||
} | ||
|
||
for man_page in man_pages { | ||
_ = Command::new("sh") | ||
.arg("-c") | ||
.arg(format!("scdoc <{}>{}", man_page.0, man_page.1)) | ||
.spawn(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
wayshot(1) "github.com/waycrate/wayshot" "General Commands Manual" | ||
|
||
# NAME | ||
|
||
Wayshot - Screenshot tool for compositors implementing zwlr_screencopy_v1 such as sway and river | ||
|
||
# SYNOPSIS | ||
|
||
*wayshot* [_options_] | ||
|
||
# OPTIONS | ||
|
||
*-h*, *--help* | ||
Print help message and quit. | ||
|
||
*-V*, *--version* | ||
Print version information. | ||
|
||
*-d*, *--debug* | ||
Enable debug mode. | ||
|
||
*-c*, *--cursor* | ||
Enable cursor visibility in screenshots. | ||
|
||
*-e*, *--extension* | ||
Set the image encoder. | ||
Valid arguments: | ||
- jpeg | ||
- jpg | ||
- png (Default encoder) | ||
- ppm | ||
|
||
*-f*, *--file* | ||
Set a custom file path. The default path is `./{current_unix_timestamp}-wayshot.{encoder}` | ||
eg: 1659034753-wayshot.png | ||
|
||
*-l*, *--listoutputs* | ||
List all valid output names. This flag is generally used in combination with *-o* flag. | ||
|
||
*-o*, *--output* | ||
Choose a particular display (wl_output) to screenshot. | ||
|
||
*-s*, *--slurp* | ||
Choose a portion of your display to screenshot using the slurp program. | ||
https://github.com/emersion/slurp | ||
|
||
*--stdout* | ||
Emit image data to stdout. The following flag is helpful to pipe image data | ||
to other programs. | ||
|
||
# KNOWN BUGS | ||
|
||
Feel free to send patches for the following: | ||
- *--slurp* flag does not work as intended on multi monitor systems. After multiple attempts at fixing this I have failed time and again. | ||
|
||
# SEE ALSO | ||
- wayshot(7) | ||
|
||
# AUTHORS | ||
|
||
Maintained by Shinyzenith <[email protected]>. | ||
For more information about development, see <https://github.com/waycrate/wayshot>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
wayshot(7) "github.com/waycrate/wayshot" "Miscellaneous Information Manual" | ||
|
||
# NAME | ||
|
||
Wayshot - Screenshot tool for compositors implementing zwlr_screencopy_v1 such as sway and river | ||
|
||
# SYNOPSIS | ||
|
||
*wayshot* [_options_] | ||
|
||
# REGION SELECTION | ||
wayshot -s "$(slurp -f '%x %y %w %h')" | ||
|
||
# FULLSCREEN | ||
|
||
wayshot | ||
|
||
# CUSTOM FILE PATH AND EXTENSION | ||
|
||
wayshot -f ../screenshot.png --extension ppm | ||
|
||
# SCREENSHOT AND COPY TO CLIPBOARD | ||
|
||
wayshot --stdout -e jpeg | wl-copy | ||
|
||
# SCREENSHOT A PARTICULAR DISPLAY | ||
|
||
wayshot -l # Pick any output name from the following. We use eDP-1 for this example. | ||
wayshot -o eDP-1 | ||
|
||
# PICK A HEX COLOR CODE, USING IMAGEMAGICk | ||
|
||
wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format '%[pixel:p{0,0}]' txt:-|egrep "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})" -o | ||
|
||
# PICK A HEX COLOR CODE WITHOUT USING IMAGEMAGICK | ||
|
||
wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout -e ppm | tail -c 3 | od -An -tuC | xargs printf '#%02X%02X%02X\n' | ||
|
||
# PICK A COLOR, USING IMAGEMAGICK | ||
|
||
wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format '%[pixel:p{0,0}]' txt:- | ||
|
||
# AUTHORS | ||
|
||
Maintained by Shinyzenith <[email protected]>. | ||
For more information about development, see <https://github.com/waycrate/wayshot>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters