docs: add screenshots sample

This commit is contained in:
kenji
2026-01-03 10:58:10 -06:00
parent 80ea4c9e55
commit 69a6571d5b
4 changed files with 27 additions and 14 deletions
+8
View File
@@ -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
```
+17 -12
View File
@@ -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,9 +35,11 @@
'';
in {
home.packages = with pkgs; [
grimblast # Hyprland screenshot utility
grim # Screenshot utility
slurp # Region selector
swappy # Annotation tool
wl-clipboard # For clipboard operations
jq # For window selection
wl-clipboard # For copying to clipboard
screenshot # Our wrapper script
];
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 KiB