Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/eww/eww.yuck
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

;; Capture button
(button :class {capture-type == "screenshot" ? "cap-shutter-btn" : "cap-shutter-btn recording"}
:onclick "(stoa-capture ${capture-mode} ${capture-type} ${capture-delay} </dev/null >/dev/null 2>&1 &)"
:onclick "stoa-capture ${capture-mode} ${capture-type} ${capture-delay}"
(label :class "cap-shutter-icon"
:text {capture-type == "screenshot" ? "●" : "●"}))

Expand Down
14 changes: 13 additions & 1 deletion scripts/stoa-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,19 @@ case "${1:-}" in
fi
;;
selection|screen|window)
echo "DEBUG: Case selection/screen/window triggered with args: $*" >> /tmp/stoa-capture-debug.log
echo "DEBUG: Case selection/screen/window triggered with args: $*" >> /tmp/stoa-capture-debug.log

# eww kills its onclick child after 200ms. Re-exec ourselves detached
# so the actual capture work survives. _STOA_CAPTURE_DETACHED guards
# against infinite recursion.
if [ -z "${_STOA_CAPTURE_DETACHED:-}" ]; then
echo "DEBUG: Re-execing detached" >> /tmp/stoa-capture-debug.log
_STOA_CAPTURE_DETACHED=1 nohup "$0" "$@" </dev/null >>/tmp/stoa-capture-debug.log 2>&1 &
disown 2>/dev/null || true
exit 0
fi

echo "DEBUG: Running in detached mode" >> /tmp/stoa-capture-debug.log
local_mode="$1"
local_type="${2:-screenshot}"
local_delay="${3:-0}"
Expand Down
Loading