From 8dd89742bc0eef583a3bbabc6a9748f15546ab4e Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Fri, 20 Mar 2026 16:24:43 +0530 Subject: Moving the screen recording from i3 shortcut to a shell script --- modules/desktop/i3/keybindings.nix | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'modules/desktop') diff --git a/modules/desktop/i3/keybindings.nix b/modules/desktop/i3/keybindings.nix index 5b16a05..9d6e668 100644 --- a/modules/desktop/i3/keybindings.nix +++ b/modules/desktop/i3/keybindings.nix @@ -84,22 +84,4 @@ in lib.mkIf config.tools.maim.enable "exec \"${lib.getExe pkgs.maim} -s | xclip -selection clipboard -t image/png\""; "${mod}+Shift+p" = lib.mkIf config.tools.maim.enable "exec \"mkdir -p ~/Pictures/Screenshots && ${lib.getExe pkgs.maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png\""; - - # --- Screen Recordings --- - "${mod}+Mod1+r" = lib.mkIf config.tools.ffmpeg.enable ( - let - pidFile = "/tmp/ffmpeg-screenrecord.pid"; - outDir = "~/Videos/Recordings"; - in - "exec \"" - + "if [ -f ${pidFile} ]; then " - + "kill $(cat ${pidFile}) && rm ${pidFile}; " - + "else " - + "mkdir -p ${outDir} && " - + "${lib.getExe pkgs.ffmpeg-full} -f x11grab -i $DISPLAY " - + "-framerate 30 -c:v libx264 -preset ultrafast -crf 23 " - + "${outDir}/recording-$(date +%Y%m%d-%H%M%S).mp4 " - + "& echo $! > ${pidFile}; " - + "fi\"" - ); } -- cgit v1.2.3