Merge branch 'dev' into rc
This commit is contained in:
+23
@@ -788,6 +788,25 @@ show_group_help() {
|
|||||||
fi
|
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() {
|
show_related_commands() {
|
||||||
local key="$1"
|
local key="$1"
|
||||||
local group="${COMMAND_GROUP[$key]}"
|
local group="${COMMAND_GROUP[$key]}"
|
||||||
@@ -1005,6 +1024,10 @@ dispatch_or_help() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if show_prefix_help "omarchy ${args[*]}"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Unknown Omarchy command: omarchy ${args[*]}" >&2
|
echo "Unknown Omarchy command: omarchy ${args[*]}" >&2
|
||||||
suggestion=$(suggest_command "${args[0]}")
|
suggestion=$(suggest_command "${args[0]}")
|
||||||
if [[ -n $suggestion ]]; then
|
if [[ -n $suggestion ]]; then
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ SELECTION=$(slurp 2>/dev/null)
|
|||||||
|
|
||||||
[[ -z $SELECTION ]] && exit 0
|
[[ -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
|
[[ -z $TEXT ]] && exit 1
|
||||||
|
|
||||||
|
|||||||
Executable
+5
@@ -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
|
||||||
@@ -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/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-display.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.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
|
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-suspend-nvme.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-t2.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-bcm43xx.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.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
|
# 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
|
# 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
|
# 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
|
# 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.
|
# 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
|
if omarchy-hw-asus-expertbook-b9406; then
|
||||||
sudo mkdir -p /etc/limine-entry-tool.d
|
sudo mkdir -p /etc/limine-entry-tool.d
|
||||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/asus-expertbook-b9406-display.conf >/dev/null
|
cat <<EOF | sudo tee /etc/limine-entry-tool.d/asus-expertbook-b9406-display.conf >/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_panel_replay=0"
|
||||||
KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1"
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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 <<EOF | sudo tee /etc/limine-entry-tool.d/asus-ptl-display-backlight.conf >/dev/null
|
||||||
|
# ASUS Panther Lake display backlight fix
|
||||||
|
KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
@@ -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
|
||||||
@@ -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 cp "$OMARCHY_PATH/default/wayland-sessions/omarchy.desktop" /usr/local/share/wayland-sessions/omarchy.desktop
|
||||||
|
|
||||||
sudo mkdir -p /etc/sddm.conf.d
|
sudo mkdir -p /etc/sddm.conf.d
|
||||||
|
cat <<EOF | sudo tee /etc/sddm.conf.d/10-wayland.conf >/dev/null
|
||||||
|
[General]
|
||||||
|
DisplayServer=wayland
|
||||||
|
|
||||||
|
[Wayland]
|
||||||
|
CompositorCommand=Hyprland
|
||||||
|
EOF
|
||||||
|
|
||||||
if [[ ! -f /etc/sddm.conf.d/autologin.conf ]]; then
|
if [[ ! -f /etc/sddm.conf.d/autologin.conf ]]; then
|
||||||
cat <<EOF | sudo tee /etc/sddm.conf.d/autologin.conf
|
cat <<EOF | sudo tee /etc/sddm.conf.d/autologin.conf
|
||||||
[Autologin]
|
[Autologin]
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
echo "Fix display backlight on supported ASUS Panther Lake laptops"
|
||||||
|
|
||||||
|
EXPERTBOOK_DROP_IN="/etc/limine-entry-tool.d/asus-expertbook-b9406-display.conf"
|
||||||
|
|
||||||
|
if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then
|
||||||
|
if [[ -f $EXPERTBOOK_DROP_IN ]]; then
|
||||||
|
sudo sed -i '/xe\.enable_dpcd_backlight/d' "$EXPERTBOOK_DROP_IN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$OMARCHY_PATH/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh"
|
||||||
|
|
||||||
|
if omarchy-cmd-present limine-update; then
|
||||||
|
sudo limine-update
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
echo "Fix bass speakers on Lenovo Yoga Pro 7 14IAH10"
|
||||||
|
|
||||||
|
source "$OMARCHY_PATH/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
echo "Configure SDDM to use Wayland for the greeter"
|
||||||
|
|
||||||
|
sudo mkdir -p /etc/sddm.conf.d
|
||||||
|
cat <<EOF | sudo tee /etc/sddm.conf.d/10-wayland.conf >/dev/null
|
||||||
|
[General]
|
||||||
|
DisplayServer=wayland
|
||||||
|
|
||||||
|
[Wayland]
|
||||||
|
CompositorCommand=Hyprland
|
||||||
|
EOF
|
||||||
@@ -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 help renders" "$output" "omarchy hw asus rog"
|
||||||
assert_output_contains "hardware group includes touchpad" "$output" "omarchy hw touchpad"
|
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)
|
output=$("$CLI" menu --help)
|
||||||
assert_output_contains "menu group includes share fallback route" "$output" "omarchy menu share"
|
assert_output_contains "menu group includes share fallback route" "$output" "omarchy menu share"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user