Add home manager modules

This commit is contained in:
2025-11-04 02:38:41 +08:00
parent c27291b1b9
commit f4cfe371f7
8 changed files with 901 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
# helper function to crop cs3223 slides
crop_slides() {
input="$1"
if [ -z "$input" ]; then
echo "Usage: crop_slides <inputfile>"
return 1
fi
# Get base name (without extension)
base="${input%.*}"
output="${base}-slides.mp4"
# Crop left 2/3 of a 1280x640 video (≈853 px wide)
nix run "nixpkgs#ffmpeg" -- -i "$input" -filter:v "crop=853:640:0:0" -c:a copy "$output"
}