Hi there having trouble trying to get the syntax correct. Here’s my hyprlang code block for screenshots. The problem seems to with more complex shell scripting.
# Region → annotate in satty → auto-copy to clipboard (most useful daily bind)
bind = , XF86SELECTIVESCREENSHOT, exec, grim -g "$(slurp)" - | satty --filename - --copy-command wl-copy --early-exit --fullscreen
# Fullscreen screenshot → annotate → copy
bind = SHIFT, XF86SELECTIVESCREENSHOT, exec, grim - | satty --filename - --copy-command wl-copy --early-exit --fullscreen
# Region → annotate → save to file (with timestamp)
bind = SUPER SHIFT, XF86SELECTIVESCREENSHOT, exec, grim -g "$(slurp)" -t ppm - | satty --filename - --output-filename ~/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png
# Quick region capture → save directly (no edit)
bind = CTRL SHIFT, XF86SELECTIVESCREENSHOT, exec, mkdir -p ~/Pictures/Screenshots && grim -g "$(slurp)" ~/Pictures/Screenshots/screenshot-$(date +%Y-%m-%d-%H%M%S).png
hl.bind("XF86SELECTIVESCREENSHOT",
h1.dsp.exec_cmd("grim -g "$(slurp)" - | satty --filename - --copy-command wl-copy --early-exit --fullscreen"))
hl.bind("SHIFT + XF86SELECTIVESCREENSHOT",
h1.dsp.exec_cmd("grim - | satty --filename - --copy-command wl-copy --early-exit --fullscreen"))
hl.bind("SUPER + SHIFT + XF86SELECTIVESCREENSHOT",
h1.dsp.exec_cmd("grim -g "$(slurp)" -t ppm - | satty --filename - --output-filename ~/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png"))
hl.bind("CTRL + SHIFT = XF86SELECTIVESCREENSHOT",
h1.dsp.exec_cmd("mkdir -p ~/Pictures/Screenshots && grim -g "$(slurp)" ~/Pictures/Screenshots/screenshot-$(date +%Y-%m-%d-%H%M%S).png"))
What am I missing here? Surely it’s a Lua and / or shell scripting syntax, escape issue, etc.?