From 8950e8f42aa6e922f7d6c159aee9243640143559 Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 12 Feb 2026 16:01:55 +0100 Subject: [PATCH] now sceenrecording also works --- desktopenvs/hyprland/hypr-usr/binds.conf | 2 +- desktopenvs/hyprland/scripts/screenrec.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 desktopenvs/hyprland/scripts/screenrec.sh diff --git a/desktopenvs/hyprland/hypr-usr/binds.conf b/desktopenvs/hyprland/hypr-usr/binds.conf index a44391c..c3e6d55 100644 --- a/desktopenvs/hyprland/hypr-usr/binds.conf +++ b/desktopenvs/hyprland/hypr-usr/binds.conf @@ -52,7 +52,7 @@ $vimright = l $vimup = k $vimdown = j -bind = $mainMod CTRL, P, exec, bash ~/.config/scripts/togglewinbars.sh +bind = $mainMod CTRL, P, exec, ~/.config/scripts/screenrec.sh #bind = $mainMod, E, hyprexpo:expo, toggle # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more diff --git a/desktopenvs/hyprland/scripts/screenrec.sh b/desktopenvs/hyprland/scripts/screenrec.sh new file mode 100755 index 0000000..78d7263 --- /dev/null +++ b/desktopenvs/hyprland/scripts/screenrec.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +mkdir -p ~/Videos +statecon=$( pidof wf-recorder ) +if [ "$statecon" == '' ]; then + + rm ~/Videos/lastrec.mp4 + notify-send "recording started" + wf-recorder -g "$(slurp)" -a -f ~/Videos/lastrec.mp4 +else + + notify-send "recording ended" + killall -s SIGINT wf-recorder + wl-copy < ~/Videos/lastrec.mp4 +fi + +