Digitalism (notes on tools)

Programs

date

description
print or set the system date and time
get dates for e.g. file names
date -Iminutes

maim

description
maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on another program called slop to query the user for regions using the graphical interface.
full sceenshot
maim destination.png
current window screenshot
maim -i (xdotool getactivewindow) destination.png
selected area screenshot
maim -s destination.png
name output based on time
maim (date -Iminutes).png
get color of selected pixel
maim -st 0 | convert - -resize 1x1\! -format '%[pixel:p{0,0}]' info:-

xclip

description
command line interface to X selections (clipboard)
pipe screenshot to clipboard
maim -s | xclip -selection clipboard --target image/png
pipe program output to clipboard
head file.txt | xclip -selection clipbaord

tac

description
reverse input line-wise

rev

description
reverse input character-wise

Scripts

Rename file extension

!#/bin/bash
for f in *.JPG;
  do mv -- "$f" "${f%.JPG}.jpg";
done

Get paste-able filename list (used for {log} entries)

ls -1 2021-08-*