this repo has no description
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

setup gpu recorder for area and screen

dawn 4486c07f fcf1fb24

+31 -3
+12
users/modules/gsr/record-area.sh
··· 1 + #!/bin/sh -e 2 + 3 + TMPFILE="/tmp/gsr-clip" 4 + SHOT_DIR="$HOME/shots" 5 + mkdir -p "$SHOT_DIR" 6 + 7 + OUTFILE="$SHOT_DIR/$(date '+%Y-%m-%d_%H-%M-%S').mp4" 8 + pkill -f -SIGINT gpu-screen-recorder && sleep 0.3 && mv -f $TMPFILE $OUTFILE && notify-send -t 1500 -u low -- "gpu screen recorder" "recording saved" && exit 0 9 + 10 + AREA=$(slurp -d -f "%wx%h+%x+%y") || exit 0 11 + gpu-screen-recorder -w "$AREA" -f 60 -a default_output -k av1 -c mp4 -bm cbr -q 16000 -o "$TMPFILE" > /tmp/gsr-screen.log 2>&1 & 12 + notify-send -t 1500 -u low -- "gpu screen recorder" "recording area"
+12
users/modules/gsr/record-screen.sh
··· 1 + #!/bin/sh -e 2 + # 3 + TMPFILE="/tmp/gsr-clip" 4 + SHOT_DIR="$HOME/shots" 5 + mkdir -p "$SHOT_DIR" 6 + 7 + OUTFILE="$SHOT_DIR/$(date '+%Y-%m-%d_%H-%M-%S').mp4" 8 + pkill -f -SIGINT gpu-screen-recorder && sleep 0.3 && mv -f $TMPFILE $OUTFILE && notify-send -t 1500 -u low -- "gpu screen recorder" "recording saved" && exit 0 9 + 10 + OUTPUT=$(niri msg --json focused-output | jq -r '.name') 11 + gpu-screen-recorder -w "$OUTPUT" -f 60 -a default_output -k av1 -c mp4 -bm cbr -q 16000 -o "$TMPFILE" > /tmp/gsr-screen.log 2>&1 & 12 + notify-send -t 1500 -u low -- "gpu screen recorder" "recording area"
+4 -2
users/modules/niri/config.kdl
··· 114 114 } 115 115 116 116 spawn-at-startup "swaybg" "-i" "%%wallpaper%%" 117 - spawn-at-startup "systemctl" "--user" "start" "gsr-replay.service" 117 + // spawn-at-startup "systemctl" "--user" "start" "gsr-replay.service" 118 118 119 119 hotkey-overlay { 120 120 // skip-at-startup ··· 171 171 172 172 Alt+S hotkey-overlay-title="screenshot screen" { screenshot-screen; } 173 173 Alt+Shift+S hotkey-overlay-title="screenshot" { screenshot; } 174 - Alt+Shift+R hotkey-overlay-title="save replay" { spawn-sh "sh %%gsr-replay-save%%"; } 174 + // Alt+Shift+R hotkey-overlay-title="save replay" { spawn-sh "sh %%gsr-replay-save%%"; } 175 + Alt+R hotkey-overlay-title="record screen" { spawn-sh "sh %%gsr-record-screen%%"; } 176 + Alt+Shift+R hotkey-overlay-title="record area" { spawn-sh "sh %%gsr-record-area%%"; } 175 177 176 178 XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } 177 179 XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
+3 -1
users/modules/niri/default.nix
··· 15 15 ../clipman 16 16 ]; 17 17 18 - home.packages = with pkgs; [file libnotify clipman niri xwayland-satellite brightnessctl swaybg]; 18 + home.packages = with pkgs; [file libnotify clipman niri xwayland-satellite brightnessctl swaybg slurp jq]; 19 19 xdg.configFile."niri/config.kdl".text = 20 20 let 21 21 replace = { ··· 23 23 clipboard-upload = toString ./uploader.nu; 24 24 clipboard-select = toString ./clipboard.nu; 25 25 gsr-replay-save = toString ../gsr/save-replay.sh; 26 + gsr-record-screen = toString ../gsr/record-screen.sh; 27 + gsr-record-area = toString ../gsr/record-area.sh; 26 28 }; 27 29 in 28 30 l.replaceStrings