this post was submitted on 11 Nov 2025
8 points (100.0% liked)

Hyprland Desktop Environment

538 readers
2 users here now

An (unnoficial) Hyprland Community in the new Land!
You can share and help each other when using Hyprland here.. :)

Resources:

founded 2 years ago
MODERATORS
 

Not just screenshots like hyprshot, but also recording videos of part of the screen. I used to use spectacle but there's no way without kwin.

top 6 comments
sorted by: hot top controversial new old
[–] LodeMike@lemmy.today 6 points 1 week ago
[–] capuccino@lemmy.world 4 points 1 week ago* (last edited 1 week ago)

bind screenshot key to execute flameshot full -c

edit: for video I use obs

[–] cobwoms@lemmy.blahaj.zone 3 points 1 week ago (2 children)

i have this script on a keybind.

uses rofi, slurp and gpu-screen-recorder

modify as needed. i dont remember where i got it from originally

#!/bin/env bash

recorder_check() {
	if pgrep -x "gpu-screen-reco" > /dev/null; then
			pkill -INT -x gpu-screen-reco
			notify-send "Stopping all instances of gpu-screen-recorder" "$(cat /tmp/recording.txt)"
			cat /tmp/recording.txt | wl-copy
			exit 0
	fi
}

recorder_check

SELECTION=$(echo -e "record selection\nrecord eDP-1\nrecord DP-4" | rofi -dmenu -p "󰄀 ")

VID="${HOME}/video/recordings/$(date +%Y-%m-%d_%H-%m-%s).mp4"

case "$SELECTION" in
	"record selection")
		echo "$VID" > /tmp/recording.txt
    # Get selection geometry
    read X Y W H <<< $(slurp -f "%x %y %w %h")

    # Get monitor info (JSON)
    MONITORS=$(hyprctl monitors -j)

    # Find the monitor containing the selection and extract its scale
    SCALE=$(echo "$MONITORS" | jq -r \
      --argjson x "$X" --argjson y "$Y" '
      .[] | select(.x <= $x and .y <= $y and
                   ($x < (.x + .width)) and
                   ($y < (.y + .height))) | .scale')

    # Calculate physical coordinates
    PX=$(awk "BEGIN {printf \"%d\", $X * $SCALE}")
    PY=$(awk "BEGIN {printf \"%d\", $Y * $SCALE}")
    PW=$(awk "BEGIN {printf \"%d\", $W * $SCALE}")
    PH=$(awk "BEGIN {printf \"%d\", $H * $SCALE}")

    # Format geometry string
    GEOM="${PW}x${PH}+${PX}+${PY}"
		gpu-screen-recorder -w region -region "$GEOM" -o "$VID" &>/dev/null
		;;
	"record eDP-1")
		echo "$VID" > /tmp/recording.txt
    gpu-screen-recorder -w eDP-1 -o "$VID" &>/dev/null
		;;
	"record DP-4")
		echo "$VID" > /tmp/recording.txt
    gpu-screen-recorder -w DP-4 -o "$VID" &>/dev/null
	;;
"record both screens")
	notify-send "recording both screens is not functional"
	;;
*)
	;;
esac
[–] northernlights@lemmy.today 1 points 18 hours ago (1 children)

That works perfect btw thank you.

[–] cobwoms@lemmy.blahaj.zone 1 points 17 hours ago* (last edited 17 hours ago)

np

i did have issues recently trying to capture from a selection on multiple displays when each display is a different scale factor.... i haven't had time to figure out how to fix that, for now i just capture on my main display only

[–] northernlights@lemmy.today 2 points 1 week ago