diff --git a/bin/omarchy-hw-hybrid-gpu b/bin/omarchy-hw-hybrid-gpu new file mode 100755 index 00000000..dcd0a8fd --- /dev/null +++ b/bin/omarchy-hw-hybrid-gpu @@ -0,0 +1,3 @@ +#!/bin/bash + +(($(lspci | grep -cE 'VGA|3D|Display') >= 2)) diff --git a/bin/omarchy-hw-touchpad b/bin/omarchy-hw-touchpad index 4bea4a68..a4d813e0 100755 --- a/bin/omarchy-hw-touchpad +++ b/bin/omarchy-hw-touchpad @@ -1,3 +1,4 @@ #!/bin/bash -hyprctl devices -j | jq -r '[.mice[] | .name | select(test("touchpad|trackpad"; "i"))] | first // empty' +device=$(hyprctl devices -j | jq -r '[.mice[] | .name | select(test("touchpad|trackpad"; "i"))] | first // empty') +[[ -n $device ]] && echo "$device" diff --git a/bin/omarchy-menu b/bin/omarchy-menu index c929755b..4cd677c2 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -184,9 +184,13 @@ show_toggle_menu() { } show_hardware_menu() { - local options="󰛧 Laptop Display\n Hybrid GPU" + local options="󰛧 Laptop Display" - if [[ -n "$(omarchy-hw-touchpad)" ]]; then + if omarchy-hw-hybrid-gpu; then + options="$options\n Hybrid GPU" + fi + + if omarchy-hw-touchpad; then options="$options\n󰟸 Touchpad" fi