Git Product home page Git Product logo

rofi-screenshot's Introduction

rofi-screenshot

I got sick of not having a simple solution to take screenshots and screencasts.

Plus, there's so many different things I might want to do I struggle to find key bindings for all of them. So, I created a script to show and execute various screen capture related commands in Rofi.

Features

  • Capture a region to the clipboard or a directory
  • Capture the whole screen to the clipboard or a directory
  • Record a specific region and save as a gif or MP4
  • Record the whole screen and save as a gif or MP4

Installation

Make sure you have the required dependencies installed.

Download the rofi-screenshot source code, save as rofi-screenshot and make it executable

$ curl -L https://git.io/rofi-screenshot > rofi-screenshot && chmod u+x rofi-screenshot

Then move rofi-screenshot to somewhere in your $PATH for example:

$ sudo mv rofi-screenshot /usr/local/bin/

Usage

Show the rofi menu

$ rofi-screenshot

Stop recording

$ rofi-screenshot -s

Tip: Add a keybinding for both of the above commands

By default files will be stored in $XDG_PICTURES_DIR/Screenshots, which typically means ~/Pictures/Screenshots. Use $ROFI_SCREENSHOT_DIR environment variable to override this default.

Dependencies

rofi-screenshot's People

Contributors

ceuk avatar joao-vitor-sr avatar sdushantha avatar seanhagen avatar xaprier avatar zopieux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rofi-screenshot's Issues

Partial screenshot functions won't capture GTK apps

Hey, I just came across your script via r/unixporn. Nice one.

I'm having an issue with partial screenshots though. It only occurs when trying to capture GTK applications windows.

When clicking on a GTK app window, It'll just capture a pixel, which seems to be the same color than my window border color (I'm using bspwm). No issue with Qt apps or my terminal windows (kitty).

I guess the culprit is either ffcast or slop because replacing

crtc() {
[...]
  ffcast -q $(slop -n -f '-g %g ') png /tmp/screenshot_clip.png
[...]
}
crtf() {
[...]
  ffcast -q $(slop -n -f '-g %g ') png "$screenshot_directory/$dt.png"
[...]
}

with

rtc() {
[...]
  maim -s -u -m 10 /tmp/screenshot_clip.png
[...]
}
crtf() {
[...]
  maim -s -u -m 10 "$screenshot_directory/$dt.png"
[...]
}

solves the issue.

Maybe it can be fixed without having to install maim, I don't know.

Cheers

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.