• Stars
    star
    2,135
  • Rank 21,517 (Top 0.5 %)
  • Language
    C++
  • License
    Other
  • Created about 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.

maim

maim (Make Image) is an utility that takes screenshots of your desktop. It's meant to overcome shortcomings of scrot and performs better in several ways.

Features

  • Takes screenshots of your desktop, and saves it in png, jpg, or bmp format.
  • Takes screenshots of predetermined regions or windows, useful for automation.
  • Allows a user to select a region, or window, before taking a screenshot on the fly.

screenshot with selection

  • Blends the system cursor to the screenshot. screenshot with cursor
  • Masks off-screen pixels to be transparent or black.

screenshot with masked pixels

  • Maim cleanly pipes screenshots directly to standard output (unless otherwise specified), allowing for command chaining.
  • Maim supports anything slop does, even selection shaders!

slop animation

Installation

Install using your Package Manager (Preferred)

Install using CMake (Requires CMake, git, libXrender, libXfixes, libGLM, libxcomposite, libxrandr, libxext, GLEW)

git clone https://github.com/naelstrof/slop.git
cd slop
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" ./
make && sudo make install
cd ..
git clone https://github.com/naelstrof/maim.git
cd maim
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" ./
make && sudo make install

Examples

Maim allows for a lot of unique and interesting functionalities. Here's an example of a few interactions.

  • This command will allow you to select an area on your screen, then copy the selection to your clipboard. This can be used to easily post images in mumble, discord, gimp-- or any other image supporting application.
$ maim -s | xclip -selection clipboard -t image/png
  • This messy command forces a user to select a window to screenshot, then applies a shadow effect using imagemagick, then saves it to shadow.png. It looks really nice on windows that support an alpha channel.
$ maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png
  • This command is a particular favorite of mine, invented by a friend. It simply prints the RGB values of the selected pixel. A basic color picker that has the additional ability to average out the pixel values of an area. If used cleverly with the geometry and window flag, the return color might warn you of a found counter-strike match...
$ maim -st 0 | convert - -resize 1x1\! -format '%[pixel:p{0,0}]' info:-
  • This is a basic, but useful command that simply screenshots the current active window.
$ maim -i $(xdotool getactivewindow) ~/mypicture.jpg
  • This is another basic command, but I find it necessary to describe the usefulness of date. This particular command creates a full screenshot, and names it as the number of seconds that passed since 1970. Guaranteed unique, already sorted, and easily read.
$ maim ~/Pictures/$(date +%s).png
  • This one overlays a still of your desktop, then allows you to crop it. Doesn't play well with multiple monitors, but I'm sure if it did it wouldn't look this pretty and simple.
$  maim -u | feh -F - & maim -s -k cropped.png && kill $!
$ maim -s /tmp/screenshot.png; imgur.sh /tmp/screenshot.png | xclip -selection clipboard
  • The following command can be used to select a QR code (or click into a window where a QR code is present), decode it, print the text to the console and copy the text into the clipboard for further usage.
$ maim -qs | zbarimg -q --raw - | xclip -selection clipboard -f
  • Shortcut for i3 window manager:
    • Enable light on the Thinkpad T430 laptop
    • Wait 5 seconds
    • Screenshot all displays
    • Save file like ~/screenshots/2022-dec-21--12-56-08_maim.png
    • Disable light
    • Show i3 notification for 3 seconds:
bindsym $mod+Shift+x exec "\
    echo 1 > /sys/class/leds/platform\:\:micmute/brightness; \
    sleep 5; \
    maim --hidecursor ~/screenshots/$(date +%Y-%b-%d--%H-%M-%S_maim | tr A-Z a-z).png; \
    echo 0 > /sys/class/leds/platform\:\:micmute/brightness; \
    i3-nagbar --message 'Screenshot created' --type warning & \
    sleep 3; pkill i3-nagbar"

More Repositories

1

slop

slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
C++
845
star
2

UnityJigglePhysics

A unity addon for adding stretchy bouncy physics to bones and meshes.
ShaderLab
257
star
3

VRPlayspaceMover

A little app that lets you adjust your play-space by gripping the universe!
C++
157
star
4

SkinnedMeshDecals

An example of rendering decals on SkinnedMesh Renderers in Unity.
ShaderLab
152
star
5

UnityPenetrationTech

A gpu-based deformation system for mapping penetrators along orifice paths.
ShaderLab
103
star
6

KoboldKare

A public repo for the game KoboldKare
C#
87
star
7

UnitySourceTools

Some tools that I use to port source maps to Unity.
C#
31
star
8

ShapedAudioReverbZones

A Unity implementation for arbitrarily shaped Reverb Zones.
C#
23
star
9

URPUnityTerrainTools

Some brush-based tools for creating terrains in Unity. WIP
ShaderLab
11
star
10

ChurnVectorSDK

Tools to develop characters and maps for Churn Vector.
GLSL
9
star
11

astrostructlove

A SS13 clone designed on the Love2D framework with proper networking.
Lua
7
star
12

UnityBehaviorTreeImplementation

An example of how to implement behavior trees within Unity.
C#
7
star
13

slop-python

Slop bindings for python3. Requires slop: https://github.com/naelstrof/slop
C
5
star
14

invictus

Hobby engine built using SFML.
C++
5
star
15

UnityMozzarellaTech

Some gpu related experiments involving mozzarella somewhat.
ShaderLab
4
star
16

auto-usb-arch-scripts

Mainly for personal use, I take no responsibility!
Shell
4
star
17

astrostructlove2

Another prototype for my game engine.
Lua
3
star
18

VRCLipSyncOSC

A lightweight C++ implementation of VRChat lip sync. Uses lua to configure.
C++
3
star
19

PugBot-Discord-Django

UT4Pugs.us pugbot
JavaScript
3
star
20

liveamp

Flashes your desktop wallpaper to music currently playing!
C++
3
star
21

wallpaper-post-processor

scans a directory for images to collage into appropriately sized desktop wallpapers. Uses OpenCV AI to upscale and match resolutions between photos.
Rust
3
star
22

com.naelstrof.inflatable

A limited tween solution for making body parts go boowomp in my games. For personal use.
C#
3
star
23

com.naelstrof.splines

Crude tools to do math on splines.
C#
2
star
24

UnityScriptableSettings

A tool to help with creating, localizing, and subscribing to serializable user preferences.
ShaderLab
2
star
25

2420-C-Sharp-Sorts-and-Data-Structures

Homework Assignments
C#
2
star
26

Pong

For my buddy max <3
C++
2
star
27

GodotJigglePhysics

Messing around porting jiggle physics from unity to godot.
C#
2
star
28

quadtrees

C++
2
star
29

SpaceJanitor

A machinima production for EAE 3660-02.
2
star
30

omnichem

Chemistry buddy for goonchem :honk:
JavaScript
2
star
31

Syme

Another iteration of the many game engines I'm working on. This one in particular has a 2D focus and relies on SFML for pretty much everything.
C++
2
star
32

DynamicPenetrationForGames

Tools that assist with penetration in the Unity Engine.
ShaderLab
2
star
33

com.naelstrof.easing

A library of MIT easing function implementations for Unity.
C#
2
star
34

com.naelstrof.orbitcam

A data-driven programmable camera solution for Unity. Just for personal use.
C#
1
star
35

com.naelstrof.extensions

A collection of extension methods that I use in my games.
C#
1
star
36

UnityFlocking

A tool designed to help you add foliage to scenes.
GLSL
1
star
37

com.naelstrof.projectiles

A tool that will help shoot a projectile on an intersection course.
C#
1
star
38

2420-DingoDanger

Another homework assignment, this time a GAME!
C#
1
star
39

BodegaBash

Game WIP
Mathematica
1
star
40

laser_pointer

Lets you point at people's screen remotely.
Rust
1
star