Skip to content

Instantly share code, notes, and snippets.

@alimbada
Created January 26, 2024 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alimbada/cfc47de8a1fa8a7c68bf760f5499fdbc to your computer and use it in GitHub Desktop.
Save alimbada/cfc47de8a1fa8a7c68bf760f5499fdbc to your computer and use it in GitHub Desktop.
Configure the TV input type to "PC" using LGWebOSRemote
lgtv --name MyTV --ssl startApp com.webos.app.homeconnect && sleep 4 && \
lgtv --name MyTV --ssl sendButton up up right enter && sleep 2 && \
lgtv --name MyTV --ssl sendButton enter && sleep 2 && \
lgtv --name MyTV --ssl sendButton down down down left enter && sleep 2 && \ # number of `down`s here depends on the input ID; in this case I'm configuring HDMI 3
lgtv --name MyTV --ssl sendButton down down down down down down down down down enter && sleep 2 && \
lgtv --name MyTV --ssl sendButton up up up right enter && sleep 2 && \ # as noted above, number of `up`s here depends on input ID
lgtv --name MyTV --ssl sendButton exit
@alimbada
Copy link
Author

This requires https://github.com/klattimer/LGWebOSRemote (latest as of Jan 2024)

@alimbada
Copy link
Author

TODO: set up a Hammerspoon script to run this automatically when HDMI is connected to the Macbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment