Add a toggle for crash capture (#6824)
Crash capture stays on by default, but Trigger > Toggle > Crash Capture (or `omarchy toggle crash-capture`) now turns the watcher off. The toggle writes the usual flag file and stops the unit for this session; the unit checks the same flag with ConditionPathExists, so the choice survives a logout without the unit having to be disabled. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f73740ff07
commit
30f8f191c0
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Toggle crash capture notifications
|
||||
|
||||
# nf-md-robot_dead, escaped so this file reads without a Nerd Font.
|
||||
readonly CRASH_GLYPH=$'\U000f16a1'
|
||||
|
||||
omarchy-toggle crash-capture-off
|
||||
|
||||
# The unit checks the same flag with ConditionPathExists, so stopping and
|
||||
# starting only settles this session; the next login reads the flag itself.
|
||||
if omarchy-toggle-enabled crash-capture-off; then
|
||||
systemctl --user stop omarchy-crash-watch.service
|
||||
omarchy-notification-send -g "$CRASH_GLYPH" "Crash capture disabled"
|
||||
else
|
||||
systemctl --user start omarchy-crash-watch.service
|
||||
omarchy-notification-send -g "$CRASH_GLYPH" "Crash capture enabled"
|
||||
fi
|
||||
Reference in New Issue
Block a user