diff --git a/modules/home/default.nix b/modules/home/default.nix index d02d55f..c01da8e 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -13,6 +13,7 @@ ./nvf.nix ./packages.nix # ./plasma.nix + ./screenshot.nix ./ssh.nix ./stylix.nix ./vscode.nix diff --git a/modules/home/hypr/hyprland.nix b/modules/home/hypr/hyprland.nix index fecc906..e4238ed 100644 --- a/modules/home/hypr/hyprland.nix +++ b/modules/home/hypr/hyprland.nix @@ -47,6 +47,7 @@ env = [ "NIXOS_OZONE_WL, 1" + "HYPRSHOT_DIR, ${config.xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR}" ]; }; }; diff --git a/modules/home/hypr/keybinds.nix b/modules/home/hypr/keybinds.nix index e1bf8ce..3081fa9 100644 --- a/modules/home/hypr/keybinds.nix +++ b/modules/home/hypr/keybinds.nix @@ -33,6 +33,11 @@ ", XF86MonBrightnessUp, exec, brightnessctl set 10%+" ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" + # Screenshoting + ", PRINT, exec, hyprshot -m output --raw | satty --filename -" + "$mod, PRINT, exec, hyprshot -m window --raw | satty --filename -" + "SHIFT, PRINT, exec, hyprshot -m region --raw | satty --filename -" + # Media Control Keys ", XF86AudioPrev, exec, playerctl previous" ", XF86AudioPlay, exec, playerctl play-pause" diff --git a/modules/home/screenshot.nix b/modules/home/screenshot.nix new file mode 100644 index 0000000..cba91f5 --- /dev/null +++ b/modules/home/screenshot.nix @@ -0,0 +1,17 @@ +{ + pkgs, + config, + ... +}: +{ + home.packages = with pkgs; [ + hyprshot + satty + ]; + + xdg.configFile."satty/config.toml".text = '' + [general] + fullscreen = false + output-filename = "${config.xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR}/%Y-%m-%d_%H:%M:%S.png" + ''; +}