updated hyprland to allow for extra config. this way other services can register hyprland functionality. did extactly that for gpu screen recorder
This commit is contained in:
@@ -7,4 +7,15 @@
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
|
||||
# This modules requires the dotfiles-modules.homeManager.hyprland modules to be imported
|
||||
# It adds the relevant scripts and shortcuts to be used in hyprland
|
||||
flake.modules.homeManager.gpu-screenrecorder = {
|
||||
dotfiles-modules.hyprland.extraConfig = ''
|
||||
hl.bind(MainMod .. " + SHIFT + V", hl.dsp.exec_cmd("${./gpu_screenrecorder/save-replay.sh}"))
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("${./gpu_screenrecorder/start-replay.sh}")
|
||||
end)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh -e
|
||||
killall -SIGUSR1 gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low -- "GPU Screen Recorder" "Replay saved"
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
pidof -q gpu-screen-recorder && exit 0
|
||||
video_path="$HOME/Videos"
|
||||
mkdir -p "$video_path"
|
||||
gpu-screen-recorder -w screen -f 60 -a default_output -c mkv -bm cbr -q 40000 -r 60 -o "$video_path"
|
||||
Reference in New Issue
Block a user