Skip to content

Instantly share code, notes, and snippets.

@hotrungnhan
Last active January 24, 2025 13:33
Show Gist options
  • Save hotrungnhan/533a2776cfe13d1331b5725e0023cc31 to your computer and use it in GitHub Desktop.
Save hotrungnhan/533a2776cfe13d1331b5725e0023cc31 to your computer and use it in GitHub Desktop.
LG TV Remap Magic Mouse
#!/bin/bash
# Place at /var/lib/webosbrew/init.d/enable_swap
# run chmod +x /var/lib/webosbrew/init.d/enable_swap
# Note the homebrew script that executes this won't work if you add an extension like .sh,
# so be sure to leave off the extension
swapon /home/root/swapfile
{
"yellow": {
"function": "cycle_energy_mode",
"inputs": {
"reverse_order": false,
"notifications": true
}
},
"blue": {
"function": "toggle_eye_comfort",
"inputs": {
"notifications": true
}
},
"red": {
"function": "reduce_oled_light",
"inputs": {
"increment": 10,
"disable_energy_savings": "True"
}
},
"green": {
"function": "increase_oled_light",
"inputs": {
"increment": 10,
"disable_energy_savings": "True"
}
},
"9": {
"function": "screen_off"
},
"disney": {
"function": "launch_app",
"inputs": {
"app_id": "cdp-30"
}
},
"prime": {
"function": "launch_app",
"inputs": {
"app_id": "youtube.leanback.v4"
}
},
"alexa": {
"function": "launch_app",
"inputs": {
"app_id": "com.viettel.media.tv360"
}
}
}
fallocate -l 512M /home/root/swapfile
chmod 600 /home/root/swapfile
mkswap /home/root/swapfile
swapon /home/root/swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment