docs: add screenshots sample
This commit is contained in:
@@ -11,6 +11,14 @@ A modular, flake-based NixOS configuration for a single host (`hakase`).
|
|||||||
- **SOPS** for encrypted secrets management
|
- **SOPS** for encrypted secrets management
|
||||||
- **CachyOS kernel** via chaotic-nyx for performance optimizations
|
- **CachyOS kernel** via chaotic-nyx for performance optimizations
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
+19
-14
@@ -1,28 +1,31 @@
|
|||||||
{pkgs, ...}: let
|
{pkgs, ...}: let
|
||||||
# Screenshot script using grimblast (Hyprland-native)
|
# Screenshot script with swappy integration
|
||||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
region)
|
region)
|
||||||
# Select region and edit
|
# Select region and edit
|
||||||
grimblast --freeze save area - | swappy -f -
|
grim -g "$(slurp)" - | swappy -f -
|
||||||
;;
|
;;
|
||||||
window)
|
window)
|
||||||
# Screenshot active window and edit
|
# Screenshot active window
|
||||||
grimblast --freeze save active - | swappy -f -
|
grim -g "$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | swappy -f -
|
||||||
;;
|
;;
|
||||||
screen)
|
screen)
|
||||||
# Screenshot current monitor and edit
|
# Screenshot current monitor
|
||||||
grimblast save output - | swappy -f -
|
grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" - | swappy -f -
|
||||||
;;
|
;;
|
||||||
all)
|
all)
|
||||||
# Screenshot all monitors and edit
|
# Screenshot all monitors
|
||||||
grimblast save screen - | swappy -f -
|
grim - | swappy -f -
|
||||||
;;
|
;;
|
||||||
region-save)
|
region-save)
|
||||||
# Quick region screenshot (save and copy to clipboard)
|
# Quick region screenshot (save without editing and copy to clipboard)
|
||||||
grimblast --freeze --notify copysave area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png')
|
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}"
|
echo "Usage: screenshot {region|window|screen|all|region-save}"
|
||||||
@@ -32,10 +35,12 @@
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
grimblast # Hyprland screenshot utility
|
grim # Screenshot utility
|
||||||
swappy # Annotation tool
|
slurp # Region selector
|
||||||
wl-clipboard # For clipboard operations
|
swappy # Annotation tool
|
||||||
screenshot # Our wrapper script
|
jq # For window selection
|
||||||
|
wl-clipboard # For copying to clipboard
|
||||||
|
screenshot # Our wrapper script
|
||||||
];
|
];
|
||||||
|
|
||||||
# Create Screenshots directory
|
# Create Screenshots directory
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 826 KiB |
Reference in New Issue
Block a user