Graphics - GradedJestRisk/linux-training GitHub Wiki

Display

Brightness

Using CLI

# identify a screen
xrandr -q | grep " connected"
# change its brightness (0 to 1)
xrandr --output SCREEN -1 --brightness BRIGHTNESS

Using GUI

Picture

Shrink image to fit a given size

sudo apt-get install jpegoptim
# Create the new file in a folder (same name)
jpegoptim --size=15k <SOURCE_FILE> --dest <TARGET_DIRECTORY>
# Overwrite existing
jpegoptim --size=100k <FILE> --overwrite

Convert from .heic to .jpg

sudo apt install libheif-examples

# single-file-file conversion
heif-convert $HEIC_FILENAME $JPEG_FILENAME

# folder conversion
for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done

graph

plot to console

ttyplot

Source

Plot memory consumption

snap install ttyplot
export PID_MONITOR=<OS_PID>;
while :; do grep -oP '^VmRSS:\s+\K\d+' /proc/$PID_MONITOR/status \
    | numfmt --from-unit Ki --to-unit Mi; sleep 1; done | ttyplot -u Mi
⚠️ **GitHub.com Fallback** ⚠️