diff --git a/README.md b/README.md index f83ebaa..aa22652 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,14 @@ A modular, flake-based NixOS configuration for a single host (`hakase`). - **SOPS** for encrypted secrets management - **CachyOS kernel** via chaotic-nyx for performance optimizations +## Screenshots + +![Desktop with Hakase](assets/example/desktop_hakase.png) + +![Terminal windows](assets/example/desktop_terminals.png) + +![Display overview](assets/example/desktop_display.png) + ## Structure ``` diff --git a/apps/screenshot/default.nix b/apps/screenshot/default.nix index d244f7b..4102036 100644 --- a/apps/screenshot/default.nix +++ b/apps/screenshot/default.nix @@ -1,28 +1,31 @@ {pkgs, ...}: let - # Screenshot script using grimblast (Hyprland-native) + # Screenshot script with swappy integration screenshot = pkgs.writeShellScriptBin "screenshot" '' #!/usr/bin/env bash case "$1" in region) # Select region and edit - grimblast --freeze save area - | swappy -f - + grim -g "$(slurp)" - | swappy -f - ;; window) - # Screenshot active window and edit - grimblast --freeze save active - | swappy -f - + # Screenshot active window + grim -g "$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | swappy -f - ;; screen) - # Screenshot current monitor and edit - grimblast save output - | swappy -f - + # Screenshot current monitor + grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" - | swappy -f - ;; all) - # Screenshot all monitors and edit - grimblast save screen - | swappy -f - + # Screenshot all monitors + grim - | swappy -f - ;; region-save) - # Quick region screenshot (save and copy to clipboard) - grimblast --freeze --notify copysave area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png') + # Quick region screenshot (save without editing and copy to clipboard) + filepath=~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png') + grim -g "$(slurp)" "$filepath" + wl-copy < "$filepath" + notify-send "Screenshot saved" "Saved and copied to clipboard" ;; *) echo "Usage: screenshot {region|window|screen|all|region-save}" @@ -32,10 +35,12 @@ ''; in { home.packages = with pkgs; [ - grimblast # Hyprland screenshot utility - swappy # Annotation tool - wl-clipboard # For clipboard operations - screenshot # Our wrapper script + grim # Screenshot utility + slurp # Region selector + swappy # Annotation tool + jq # For window selection + wl-clipboard # For copying to clipboard + screenshot # Our wrapper script ]; # Create Screenshots directory diff --git a/assets/example/desktop_hakase.png b/assets/example/desktop_hakase.png new file mode 100644 index 0000000..0043cdd Binary files /dev/null and b/assets/example/desktop_hakase.png differ diff --git a/assets/example/desktop_terminals.png b/assets/example/desktop_terminals.png new file mode 100644 index 0000000..87b458b Binary files /dev/null and b/assets/example/desktop_terminals.png differ