···3434To install grimblast, all I have to do is add it to my `environment.systemPackages`:
35353636```nix
3737-environment.systemPackages = with pkgs; [
3838- # ...
3939- grimblast
4040- libnotify # For notifications
4141- xdg-utils # For opening files
4242- # ...
4343-];
3737+{
3838+ environment.systemPackages = with pkgs; [
3939+ # ...
4040+ grimblast
4141+ libnotify # For notifications
4242+ xdg-utils # For opening files
4343+ # ...
4444+ ];
4545+}
4446```
45474648Grimblast will automatically save screenshots to `XDG_SCREENSHOTS_DIR`, I manually set this in my
4749_home manager_ config with:
48504951```nix
5050-xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Pictures/Screenshots";
5252+{
5353+ xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Pictures/Screenshots";
5454+}
5155```
52565357Grimblast will name the screenshots with the current date and time, which works for me.
···141145In home manager I simply have to add these strings to my Hyprland binds
142146143147```nix
144144-wayland.windowManager.hyprland.settings.bind = [
145145- # ...
146146- ",Print,exec,nu ${../res/screenshot.nu}"
147147- "SUPER SHIFT,S,exec,nu ${../res/screenshot.nu}"
148148- # ...
149149-];
148148+{
149149+ wayland.windowManager.hyprland.settings.bind = [
150150+ # ...
151151+ ",Print,exec,nu ${../res/screenshot.nu}"
152152+ "SUPER SHIFT,S,exec,nu ${../res/screenshot.nu}"
153153+ # ...
154154+ ];
155155+}
150156```
151157152158Now by switching to my new config (and making sure to stage `screenshot.nu` of course), I can take
···162168For the actual screen recording I'll be using [wf-recorder](https://github.com/ammen99/wf-recorder).
163169164170```nix
165165-environment.systemPackages = with pkgs; [
166166- # ...
167167- wf-recorder
168168- libnotify # For notifications
169169- xdg-utils # For opening files
170170- slurp # Will explain this later
171171- # ...
172172-];
171171+{
172172+ environment.systemPackages = with pkgs; [
173173+ # ...
174174+ wf-recorder
175175+ libnotify # For notifications
176176+ xdg-utils # For opening files
177177+ slurp # Will explain this later
178178+ # ...
179179+ ];
180180+}
173181```
174182175183First and foremost location, I chose to use `~/Videos/Captures` for my recordings. I didn't set an
···267275notification.
268276269277```nix
270270-wayland.windowManager.hyprland.settings.bindr = [
271271- # ...
272272- "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || nu ${../res/screenrec.nu}"
273273- # ...
274274-];
278278+{
279279+ wayland.windowManager.hyprland.settings.bindr = [
280280+ # ...
281281+ "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || nu ${../res/screenrec.nu}"
282282+ # ...
283283+ ];
284284+}
275285```
276286277287`pkill` here will exit with code `1` if it doesn't find any processes to kill, so the `||` will run