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
// To compile run: | |
// deno compile --allow-run --allow-read --allow-env screenshot.ts | |
// Add this to your sway config: for_window [class="fullscreen"] floating enable, fullscreen enable | |
// It requires viewnior to be installed. pacman -S viewnior | |
// By default it will save the screenshot in the Downloads folder, but you can specify a different folder with the -d flag. | |
// screenshot - Open the gui to take a screenshot and copy to clipboard | |
// screenshot full - Take a full screenshot and copy to clipboard | |
// screenshot -d /path/to/folder - Open the gui to take a screenshot and copy to clipboard to the specified folder | |
// screenshot -o - It compresses the screenshot with optipng before copying it to the clipboard. This requires optipng and dunst to be installed. pacman -S optipng dunst |