diff --git a/bin/omarchy b/bin/omarchy index 29b7cfb4..16aa9502 100755 --- a/bin/omarchy +++ b/bin/omarchy @@ -788,6 +788,25 @@ show_group_help() { fi } +show_prefix_help() { + local prefix="$1" + local prefix_with_space="$prefix " + local key="" + local rows="" + + while IFS= read -r key; do + [[ -n $key ]] || continue + if [[ ${COMMAND_USAGE[$key]} == $prefix_with_space* ]]; then + rows+="${COMMAND_USAGE[$key]}"$'\t'$'\t'"${COMMAND_SUMMARY[$key]}"$'\n' + fi + done < <(sorted_keys false) + + [[ -n $rows ]] || return 1 + + echo "${prefix#omarchy } commands:" + print_command_table "$rows" +} + show_related_commands() { local key="$1" local group="${COMMAND_GROUP[$key]}" @@ -1005,6 +1024,10 @@ dispatch_or_help() { return 0 fi + if show_prefix_help "omarchy ${args[*]}"; then + return 0 + fi + echo "Unknown Omarchy command: omarchy ${args[*]}" >&2 suggestion=$(suggest_command "${args[0]}") if [[ -n $suggestion ]]; then diff --git a/bin/omarchy-capture-text-extraction b/bin/omarchy-capture-text-extraction index cb0c62b5..4b49b16b 100755 --- a/bin/omarchy-capture-text-extraction +++ b/bin/omarchy-capture-text-extraction @@ -18,7 +18,7 @@ SELECTION=$(slurp 2>/dev/null) [[ -z $SELECTION ]] && exit 0 -TEXT=$(grim -g "$SELECTION" - | tesseract stdin stdout --oem 1 --psm 6 -l eng --dpi 300 -c preserve_interword_spaces=1 2>/dev/null) || exit 1 +TEXT=$(grim -g "$SELECTION" - | tesseract stdin stdout --oem 1 --psm 6 -l "${OMARCHY_OCR_LANGS:-eng}" --dpi 300 -c preserve_interword_spaces=1 2>/dev/null) || exit 1 [[ -z $TEXT ]] && exit 1 diff --git a/bin/omarchy-hw-asus-zenbook-ux5406aa b/bin/omarchy-hw-asus-zenbook-ux5406aa new file mode 100755 index 00000000..9f8da811 --- /dev/null +++ b/bin/omarchy-hw-asus-zenbook-ux5406aa @@ -0,0 +1,5 @@ +#!/bin/bash + +# omarchy:summary=Detect ASUS Zenbook UX5406AA series laptops on Intel Panther Lake. + +omarchy-hw-match "ux5406aa" && omarchy-hw-intel-ptl diff --git a/install/config/all.sh b/install/config/all.sh index 1656a2d5..39d5c6d1 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -51,6 +51,7 @@ run_logged $OMARCHY_INSTALL/config/hardware/intel/sof-firmware.sh run_logged $OMARCHY_INSTALL/config/hardware/dell/fix-xps-haptic-touchpad.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-display-backlight.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh @@ -64,6 +65,8 @@ run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-spi-keyboard.sh run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-suspend-nvme.sh run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-t2.sh +run_logged $OMARCHY_INSTALL/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh + run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh index de03d286..b77a45c4 100644 --- a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh +++ b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh @@ -1,21 +1,15 @@ -# Display fixes for ASUS ExpertBook B9406 (Panther Lake / Xe3 iGPU). +# Display fix for ASUS ExpertBook B9406 (Panther Lake / Xe3 iGPU). # # Panel Replay is Xe3-new, default-on in the xe driver, and has a broken # exit/wake path on this eDP panel: the panel latches the last-presented # frame in self-refresh and never wakes for subsequent atomic commits, so # the screen only updates on a full modeset (e.g. a VT switch). The older # xe.enable_psr=0 knob does not cover Panel Replay. -# -# The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from -# VBT (which says PWM) but the panel actually wants DPCD AUX backlight. -# Without xe.enable_dpcd_backlight=1, intel_backlight sysfs writes succeed -# but produce no visible change; brightness is effectively binary. if omarchy-hw-asus-expertbook-b9406; then sudo mkdir -p /etc/limine-entry-tool.d cat </dev/null -# ASUS ExpertBook B9406 (Panther Lake / Xe3) display workarounds +# ASUS ExpertBook B9406 (Panther Lake / Xe3) display workaround KERNEL_CMDLINE[default]+=" xe.enable_panel_replay=0" -KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" EOF fi diff --git a/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh new file mode 100644 index 00000000..cc851061 --- /dev/null +++ b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh @@ -0,0 +1,16 @@ +# Display backlight fix for ASUS Panther Lake / Xe3 iGPU laptops. +# Enabled only for ExpertBook B9406 and Zenbook UX5406AA for now. +# Other models need confirmation whether the issue exists there too. +# +# The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from +# VBT (which says PWM) but the panel actually wants DPCD AUX backlight. +# Without xe.enable_dpcd_backlight=1, intel_backlight sysfs writes succeed +# but produce no visible change; brightness is effectively binary. + +if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then + sudo mkdir -p /etc/limine-entry-tool.d + cat </dev/null +# ASUS Panther Lake display backlight fix +KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" +EOF +fi diff --git a/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh b/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh new file mode 100644 index 00000000..4459f0ae --- /dev/null +++ b/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh @@ -0,0 +1,10 @@ +# Fix bass speakers on Lenovo Yoga Pro 7 14IAH10 +# The ALC287 codec needs a pin quirk to route audio to both AMP speakers. +# Without this quirk, only one speaker works and bass output is missing. +# Reference: https://wiki.archlinux.org/title/Lenovo_Yoga_9i_2022_(14AiPI7) + +if omarchy-hw-match "Yoga Pro 7 14IAH10"; then + sudo tee /etc/modprobe.d/lenovo-yoga-pro7-bass.conf <<'EOF' +options snd-sof-intel-hda-generic hda_model=alc287-yoga9-bass-spk-pin +EOF +fi diff --git a/install/login/sddm.sh b/install/login/sddm.sh index 21696b48..b04dd027 100644 --- a/install/login/sddm.sh +++ b/install/login/sddm.sh @@ -6,6 +6,14 @@ sudo mkdir -p /usr/local/share/wayland-sessions sudo cp "$OMARCHY_PATH/default/wayland-sessions/omarchy.desktop" /usr/local/share/wayland-sessions/omarchy.desktop sudo mkdir -p /etc/sddm.conf.d +cat </dev/null +[General] +DisplayServer=wayland + +[Wayland] +CompositorCommand=Hyprland +EOF + if [[ ! -f /etc/sddm.conf.d/autologin.conf ]]; then cat </dev/null +[General] +DisplayServer=wayland + +[Wayland] +CompositorCommand=Hyprland +EOF diff --git a/test/omarchy-cli-test.sh b/test/omarchy-cli-test.sh index 5763920a..9b9a8dfb 100644 --- a/test/omarchy-cli-test.sh +++ b/test/omarchy-cli-test.sh @@ -100,6 +100,10 @@ output=$("$CLI" hw --help) assert_output_contains "hardware group help renders" "$output" "omarchy hw asus rog" assert_output_contains "hardware group includes touchpad" "$output" "omarchy hw touchpad" +output=$("$CLI" hw asus) +assert_output_contains "partial hardware prefix renders matching commands" "$output" "omarchy hw asus rog" +assert_output_contains "partial hardware prefix includes nested match" "$output" "omarchy hw asus zenbook ux5406aa" + output=$("$CLI" menu --help) assert_output_contains "menu group includes share fallback route" "$output" "omarchy menu share"