From 4a5ad3c88f5ce738582cf3209167aa6ce930f7b9 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Thu, 27 Feb 2025 14:25:27 +0100 Subject: [PATCH] feat(scripts): new 'rec1' to record screen with wf-recorder --- .config/sway/config.d/60-raccourcis.conf | 3 +++ bin/rec1 | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100755 bin/rec1 diff --git a/.config/sway/config.d/60-raccourcis.conf b/.config/sway/config.d/60-raccourcis.conf index aeea47a..118fe71 100644 --- a/.config/sway/config.d/60-raccourcis.conf +++ b/.config/sway/config.d/60-raccourcis.conf @@ -8,3 +8,6 @@ bindsym XF86AudioStop exec playerctl stop # arrêt musique/film/fichier # Bouton impression écran bindsym Print exec grim Images/$(date +'%Y-%m-%d-%s_screenshot.jpg') + +# Arrête l'enregistrement d'une vidéo avec wf-recorder +bindsym Ctrl+Shift+BackSpace exec killall -s SIGINT wf-recorder diff --git a/bin/rec1 b/bin/rec1 new file mode 100755 index 0000000..2e45689 --- /dev/null +++ b/bin/rec1 @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# change number by 2 for screen 2 +number=1 + +wf-recorder -o $(swaymsg -t get_outputs |grep "DP"|head -n ${number}|cut -d '"' -f 4) -f ~/screens/$(date +'%Y-%m-%d-%s')_screencast.mkv