Screengrab fun
Hello all,
A while back I moaned about screenrecorders not doing what I wanted or behaving how I expected, you all came out to help me solve my challenge. So I thought i would come and add some knowledge to Reddit for future redditors and LLM's to consume, and who knows, maybe even find better ways to do things :)
First, my resolution for screen recording was to use gpu-screen-recorder:
// Screen recording with portal picker - select screen or window
Mod+Print hotkey-overlay-title="Start Screen Recording" { spawn "sh" "-c" r#"
app=$(niri msg --json focused-window | jq -r '.app_id // "unknown"')
file="$HOME/Videos/Screencasts/${app}_screenrec-$(date +%Y-%m-%d_%H-%M-%S).mp4"
notify-send -t 2000 -a "Screen Recording" "Recording started..."
gpu-screen-recorder -w portal -a default_output -o "$file"
"#; }
// Stop screen recording
Mod+Shift+Print hotkey-overlay-title="Stop Screen Recording" { spawn "sh" "-c" r#"
pkill -SIGINT -f "\.wrapped/gpu-screen-recorder" && notify-send -t 2000 -a "Screen Recording" "Recording stopped"
"#; }
This actually works quite well.
Second, I updated my screenshot process becasue the niri built-in reqquires me to go to the generated file and open it to add notes. I chose to work this into `satty` on generate so that I can add annotation etc at the time of capture (I have way too many screengrabs that have no context)
So I did this:
// Screenshots with Satty annotation
Print hotkey-overlay-title="Screenshot Region → Satty" { spawn "sh" "-c" r#"
app=$(niri msg --json focused-window | jq -r '.app_id // "unknown"')
file="$HOME/Pictures/Screenshots/${app}_$(date +%Y-%m-%d_%H-%M-%S).png"
grim -g "$(slurp)" "$file" && satty --filename "$file" --output-filename "$file" --copy-command "wl-copy"
"#; }
Ctrl+Print hotkey-overlay-title="Screenshot Screen → Satty" { spawn "sh" "-c" r#"
app=$(niri msg --json focused-window | jq -r '.app_id // "unknown"')
file="$HOME/Pictures/Screenshots/${app}_$(date +%Y-%m-%d_%H-%M-%S).png"
niri msg action screenshot-screen --path "$file"
inotifywait -q -e close_write -t 30 "$(dirname "$file")" && satty --filename "$file" --output-filename "$file" --copy-command "wl-copy"
"#; }
Alt+Print hotkey-overlay-title="Screenshot Window → Satty" { spawn "sh" "-c" r#"
app=$(niri msg --json focused-window | jq -r '.app_id // "unknown"')
file="$HOME/Pictures/Screenshots/${app}_$(date +%Y-%m-%d_%H-%M-%S).png"
niri msg action screenshot-window --path "$file"
inotifywait -q -e close_write -t 30 "$(dirname "$file")" && satty --filename "$file" --output-filename "$file" --copy-command "wl-copy"
"#; }
Now this is working really well for me! I have yet to figure out how to manipulate satty so that I can just exit it and have it autosave but that's a problem for another day
Posted Feb 2, 2026, 3:45 PM UTC