From 4a6baafd052db589eaeef6eeb4a377bd9c1e0a7b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 20 Jan 2026 12:11:49 -0400 Subject: [PATCH] Move all fixes for Asus ROGs to install time --- bin/omarchy-menu | 3 +-- bin/omarchy-toggle-audio-soft-mixer | 18 ------------------ install/config/all.sh | 2 ++ .../hardware/fix-asus-rog-audio-mixer.sh | 9 +++++++++ 4 files changed, 12 insertions(+), 20 deletions(-) delete mode 100755 bin/omarchy-toggle-audio-soft-mixer create mode 100644 install/config/hardware/fix-asus-rog-audio-mixer.sh diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 2cdc9f5d..0e409982 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -145,9 +145,8 @@ show_toggle_menu() { } show_hardware_menu() { - case $(menu "Toggle" " Hybrid GPU\n󰽟 Audio Soft Mixer") in + case $(menu "Toggle" " Hybrid GPU") in *"Hybrid GPU"*) present_terminal omarchy-toggle-hybrid-gpu ;; - *"Audio Soft Mixer"*) omarchy-toggle-audio-soft-mixer ;; *) show_trigger_menu ;; esac } diff --git a/bin/omarchy-toggle-audio-soft-mixer b/bin/omarchy-toggle-audio-soft-mixer deleted file mode 100755 index f402ae54..00000000 --- a/bin/omarchy-toggle-audio-soft-mixer +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Fix volume controls for laptops with problematic Realtek codecs (like Asus G14) - -if [[ ! -f ~/.config/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf ]]; then - mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ - cp $OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf ~/.config/wireplumber/wireplumber.conf.d/ - rm -rf ~/.local/state/wireplumber/default-routes - - notify-send "󰽟 Enabled audio soft mixing" -else - rm -rf ~/.config/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf - rm -rf ~/.local/state/wireplumber/default-routes - - notify-send "󰽟 Disabled audio soft mixing" -fi - -systemctl --user restart wireplumber diff --git a/install/config/all.sh b/install/config/all.sh index 7ba72f71..f7a1097b 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -34,3 +34,5 @@ run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-spi-keyboard.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-suspend-nvme.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-audio-mixer.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-mic.sh diff --git a/install/config/hardware/fix-asus-rog-audio-mixer.sh b/install/config/hardware/fix-asus-rog-audio-mixer.sh new file mode 100644 index 00000000..79651a5f --- /dev/null +++ b/install/config/hardware/fix-asus-rog-audio-mixer.sh @@ -0,0 +1,9 @@ +# Fix audio volume on Asus ROG laptops by using a soft mixer. + +if [[ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" == "ASUSTeK COMPUTER INC." ]] && + grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null; then + + mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ + cp $OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf ~/.config/wireplumber/wireplumber.conf.d/ + rm -rf ~/.local/state/wireplumber/default-routes +fi