diff --git a/system_files/desktop/shared/usr/bin/bazzite-joystickwake b/system_files/desktop/shared/usr/bin/bazzite-joystickwake new file mode 100755 index 00000000..ae177e1c --- /dev/null +++ b/system_files/desktop/shared/usr/bin/bazzite-joystickwake @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +IMAGE_INFO="/usr/share/ublue-os/image-info.json" +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) + +if /usr/libexec/hardware/valve-hardware; then + # Don't do anything on Valve hardware, prevents lizard mode from working properly. + exit 0 +fi + +if [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then + /usr/bin/joystickwake --command "qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement wakeup" "$@" +else + /usr/bin/joystickwake "$@" +fi diff --git a/system_files/desktop/kinoite/usr/etc/xdg/autostart/joystickwake.desktop b/system_files/desktop/shared/usr/etc/xdg/autostart/joystickwake.desktop similarity index 56% rename from system_files/desktop/kinoite/usr/etc/xdg/autostart/joystickwake.desktop rename to system_files/desktop/shared/usr/etc/xdg/autostart/joystickwake.desktop index e495cd5a..111d6f74 100644 --- a/system_files/desktop/kinoite/usr/etc/xdg/autostart/joystickwake.desktop +++ b/system_files/desktop/shared/usr/etc/xdg/autostart/joystickwake.desktop @@ -4,5 +4,5 @@ Name=Joystick Wake Comment=Joystick-aware screen waker Icon=input-gaming NoDisplay=true -Exec=joystickwake --command "qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement wakeup" +Exec=/usr/bin/bazzite-joystickwake Terminal=false