Code Monkey home page Code Monkey logo

linux-screenshot-utils's Introduction

linux-screenshot-utils

Better screenshot selector to use in shell scripts.

Installation:

Install dub, gtk dev, x11 dev Optionally also install xclip, paplay or other utilities you might want to use in your workflows.

Selector utility

run dub build --root=capture to create the screenshot capture utility.

To create a minimal size utility run dub build --root=capture --compiler=ldc2 --build=release && strip capture/capture

You can use the selector utility with the "fullscreen" argument to make a fullscreen screenshot like xwd with direct conversion to a file format. For further conversion the BMP format is recommended as it is the fastest to encode and decode.

You can also use "region" or "objects" to have a selection GUI open. It will freeze what is currently on the screen when the command is run so screenshotting is easy.

You can also make links to the selector utility or rename it to force a specific selection mode. If the executable name ends with -region, -objects, -fullscreen or -window, their respective modes will be used as argument automatically.

To make screenshots:

#!/bin/bash
capture-objects png > /tmp/screenshot.png || exit 1
file=`image-history push /tmp/screenshot.png`
thumbnail="/tmp/screenshot-thumbnail-$$.bmp"
# gimp $file
url=`image-upload $file`
echo -n $url | xclip -sel clip
convert $file -resize "400x150>" $thumbnail
# kdialog --title "Successfully uploaded" --passivepopup "<img src='file://$thumbnail'>"
notify-send "Screenshot Uploaded" "<img src=\"file://$thumbnail\" alt=\"$url\"/>"

linux-screenshot-utils's People

Contributors

webfreak001 avatar

Watchers

 avatar

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.