diff --git a/bin/omarchy-capture-screenrecording b/bin/omarchy-capture-screenrecording index 1f8a169b3a6..aca3d451066 100755 --- a/bin/omarchy-capture-screenrecording +++ b/bin/omarchy-capture-screenrecording @@ -336,7 +336,8 @@ stop_screenrecording() { # Generate a preview thumbnail from the first frame ffmpeg -y -i "$filename" -ss 00:00:00.1 -vframes 1 -q:v 2 "$preview" -loglevel quiet 2>/dev/null - omarchy-notification-send "Screen recording saved" "Open with Super + Alt + , (or click this)" \ + notification_shortcut=$(omarchy-keybinding-label 'Super + Alt + ,') + omarchy-notification-send "Screen recording saved" "Open with $notification_shortcut (or click this)" \ -t 10000 --image "${preview:-$filename}" \ --exec mpv -- "$filename" diff --git a/bin/omarchy-capture-screenshot b/bin/omarchy-capture-screenshot index 6f7b91bf537..93c18ee837e 100755 --- a/bin/omarchy-capture-screenshot +++ b/bin/omarchy-capture-screenshot @@ -68,7 +68,8 @@ case "$PROCESSING" in # Best-effort: the screenshot is already saved and on the clipboard, so a # notification outage must not report the capture itself as failed. - omarchy-notification-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" \ + notification_shortcut=$(omarchy-keybinding-label 'Super + Alt + ,') + omarchy-notification-send "Screenshot saved to clipboard and file" "Edit with $notification_shortcut (or click this)" \ --image "$FILEPATH" \ --exec "$SCREENSHOT_EDITOR" "$FILEPATH" || true ;; diff --git a/bin/omarchy-games-retro-install b/bin/omarchy-games-retro-install index 9b30bb74c1b..29637daad7f 100755 --- a/bin/omarchy-games-retro-install +++ b/bin/omarchy-games-retro-install @@ -69,4 +69,5 @@ EOF chmod +x "$desktop_file" update-desktop-database "$desktop_dir" &>/dev/null || true -omarchy-notification-send -g 󰯉 "$game_name installed" "Start it with Super + Space" +menu_shortcut=$(omarchy-keybinding-label 'Super + Space') +omarchy-notification-send -g 󰯉 "$game_name installed" "Start it with $menu_shortcut" diff --git a/bin/omarchy-hw-apple-m1-air b/bin/omarchy-hw-apple-m1-air new file mode 100755 index 00000000000..30b2def1bdc --- /dev/null +++ b/bin/omarchy-hw-apple-m1-air @@ -0,0 +1,19 @@ +#!/bin/bash + +# omarchy:summary=Detect an Apple MacBook Air (M1, 2020). + +# OMARCHY_APPLE_COMPATIBLE and OMARCHY_APPLE_MODEL stub the device-tree files +# for tests, following the Apple Silicon detector's override convention. +compatible="${OMARCHY_APPLE_COMPATIBLE:-/proc/device-tree/compatible}" +model="${OMARCHY_APPLE_MODEL:-/proc/device-tree/model}" + +architecture="${OMARCHY_UNAME_M:-$(uname -m)}" || exit 1 +case $architecture in +aarch64 | arm64) ;; +*) exit 1 ;; +esac + +# Device-tree string properties are NUL-separated. Match complete records so a +# future machine such as apple,j3130 cannot be mistaken for this M1 Air. +grep -Fazqx 'apple,j313' "$compatible" 2>/dev/null && + grep -Fazqx 'Apple MacBook Air (M1, 2020)' "$model" 2>/dev/null diff --git a/bin/omarchy-hyprland-window-width b/bin/omarchy-hyprland-window-width index 78bf5d89e54..7f0b7295f80 100755 --- a/bin/omarchy-hyprland-window-width +++ b/bin/omarchy-hyprland-window-width @@ -39,15 +39,19 @@ state_file_for() { notify_missing_width() { local key="$1" local workspace="$2" + local save_shortcut - omarchy-notification-send -g  "No saved width found for $key on workspace $workspace" "Use Super + Alt + Home to save one for this workspace." + save_shortcut=$(omarchy-keybinding-label 'Super + Alt + Home') + omarchy-notification-send -g  "No saved width found for $key on workspace $workspace" "Use $save_shortcut to save one for this workspace." } notify_saved_width() { local key="$1" local workspace="$2" + local restore_shortcut - omarchy-notification-send -g  "Saved width for $key on workspace $workspace" "Restore using Super + Home on this workspace." + restore_shortcut=$(omarchy-keybinding-label 'Super + Home') + omarchy-notification-send -g  "Saved width for $key on workspace $workspace" "Restore using $restore_shortcut on this workspace." } hypr_dispatch() { diff --git a/bin/omarchy-keybinding-label b/bin/omarchy-keybinding-label new file mode 100755 index 00000000000..d2419202fe9 --- /dev/null +++ b/bin/omarchy-keybinding-label @@ -0,0 +1,57 @@ +#!/bin/bash + +# omarchy:summary=Print a hardware-aware keybinding label for user-facing messages. +# omarchy:hidden=true + +usage() { + echo "Usage: omarchy-keybinding-label [--embedded] [--m1-air