This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| [ -z "$1" ] && echo "Usage: $0 <output>" && exit | |
| echo "Click the window you wish to record." | |
| w=( $(xwininfo 2>/dev/null | grep -E "Width|Height|Absolute" | cut -d : -f 2) ) | |
| echo "Press 'q' when finished!" | |
| ffmpeg -hide_banner -y -v quiet -stats -f x11grab -framerate 30 -video_size ${w[2]}x${w[3]} -i ${DISPLAY}.0+${w[0]},${w[1]} \ | |
| -c:v libx264 -preset ultrafast -crf 30 "$1" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # For when you want to listen to jazz with minimal CPU footprint | |
| # Requires the packages: procps, curl, html2text, mpg321, grep | |
| # Love the simplicity | |
| _atexit() { | |
| kill -TERM $mpgpid | |
| kill -TERM $disppid | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To build: | |
| # $ docker build -t perl-wmc <Dockerfile-wmc | |
| # | |
| # To run: | |
| # $ docker run -v $(pwd):/wd --network=host -it --rm perl-wmc <perl script> | |
| # | |
| FROM debian:stable-slim AS base | |
| RUN \ |