Skip to content
Open
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
6 changes: 6 additions & 0 deletions default/i18n/en/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@
"trigger.toggle.nightlight-off": {
"label": "Nightlight Off"
},
"trigger.toggle.auto-brightness-on": {
"label": "Auto Brightness On"
},
"trigger.toggle.auto-brightness-off": {
"label": "Auto Brightness Off"
},
"trigger.toggle.screensaver-on": {
"label": "Screensaver On"
},
Expand Down
2 changes: 2 additions & 0 deletions default/omarchy/omarchy-menu.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
"trigger.toggle.notifications-off": {"icon":"󰂛","label":"Silence Notifications","when":"[[ $(omarchy-shell notifications isDnd) != on ]]","action":"omarchy-toggle-notification-silencing"},
"trigger.toggle.nightlight-on": {"icon":"󰔎","label":"Nightlight On","when":"[[ $(omarchy-toggle-nightlight --status) != *'\"enabled\":true'* ]]","action":"omarchy-toggle-nightlight"},
"trigger.toggle.nightlight-off": {"icon":"󰔎","label":"Nightlight Off","when":"[[ $(omarchy-toggle-nightlight --status) == *'\"enabled\":true'* ]]","action":"omarchy-toggle-nightlight"},
"trigger.toggle.auto-brightness-on": {"icon":"󰃠","label":"Auto Brightness On","when":"omarchy-cmd-present omarchy-brightness-auto wluma && omarchy-hw-aarch64-apple && compgen -G '/sys/bus/iio/devices/*/in_illuminance_*' >/dev/null && ([[ -e ${XDG_CONFIG_HOME:-$HOME/.config}/wluma/config.toml ]] || grep -qs '^connected$' /sys/class/drm/card*-eDP-*/status) && ! omarchy-brightness-auto status --json | grep -Fq '\"enabled\":true'","action":"omarchy-brightness-auto toggle"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this closes the no-panel/no-config case. Could you link #144's lines for the config path and panel check? Also, adding set +f before the grep, inside the parentheses, keeps the glob working under noglob.

— Marcelo's agent

"trigger.toggle.auto-brightness-off": {"icon":"󰃠","label":"Auto Brightness Off","when":"omarchy-cmd-present omarchy-brightness-auto wluma && omarchy-hw-aarch64-apple && omarchy-brightness-auto status --json | grep -Fq '\"enabled\":true'","action":"omarchy-brightness-auto toggle"},
"trigger.toggle.screensaver-on": {"icon":"󱄄","label":"Screensaver On","when":"omarchy-toggle-enabled screensaver-off","action":"omarchy-toggle-screensaver"},
"trigger.toggle.screensaver-off": {"icon":"󱄄","label":"Screensaver Off","when":"! omarchy-toggle-enabled screensaver-off","action":"omarchy-toggle-screensaver"},
"trigger.toggle.crash-capture-on": {"icon":"󱚡","label":"Crash Capture On","when":"omarchy-toggle-enabled crash-capture-off","action":"omarchy-toggle-crash-capture"},
Expand Down