3 Commits

5 changed files with 21 additions and 0 deletions

View File

@@ -14,11 +14,13 @@ in
config = lib.mkIf config.modules.default_apps.enable {
xdg.mimeApps.enable = true;
xdg.mimeApps.defaultApplications = {
# Future Reference: use `xdg-mime query filetype <file>` to get the mime tyep of a given file
"text/html" = "${defaultBrowser}.desktop";
"x-scheme-handler/http" = "${defaultBrowser}.desktop";
"x-scheme-handler/https" = "${defaultBrowser}.desktop";
"x-scheme-handler/about" = "${defaultBrowser}.desktop";
"inode/directory" = "org.gnome.Nautilus.desktop";
"application/pdf" = "${defaultBrowser}.desktop";
};
xdg.terminal-exec.enable = true;

View File

@@ -27,6 +27,11 @@ in
"hypr/nix.conf".text = ''
$defaultBrowser=${defaultBrowser}
'';
"hypr/scripts/gpu-screen-recorder/save-replay.sh".source =
config.lib.file.mkOutOfStoreSymlink ./hyprland/scripts/gpu-screen-recorder/save-replay.sh;
"hypr/scripts/gpu-screen-recorder/start-replay.sh".source =
config.lib.file.mkOutOfStoreSymlink ./hyprland/scripts/gpu-screen-recorder/start-replay.sh;
};
};
}

View File

@@ -39,6 +39,9 @@ exec-once = hyprpanel & hyprpaper & hypridle & elephant & walker --gapplication-
exec-once = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic'
exec-once = gsettings set org.gnome.desktop.interface cursor-size 24
# This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder.
exec-once = ~/.config/hypr/scripts/gpu-screen-recorder/start-replay.sh
exec-once = [workspace 4 silent] signal-desktop
exec-once = [workspace 4 silent] spotify
@@ -226,6 +229,8 @@ bind = SUPER_ALT,L, exec, hyprlock
bind = ,F10, exec, hyprlock
bind = $mainMod ALT, Space, exec, hyprctl switchxkblayout current next
bind = $mainMod SHIFT, S, exec, hyprshot -m region -z
# This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder.
bind = $mainMod SHIFT, V, exec, ~/.config/hypr/scripts/gpu-screen-recorder/save-replay.sh
bind = $mainMod SHIFT, C, exec, hyprpicker | wl-copy
bind = $mainMod, Y, exec, firefox

View File

@@ -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"

View File

@@ -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"