Menu selection shell script - example USB tools sub-menu #600
ploupipoulpi
started this conversation in
Development
Replies: 1 comment 2 replies
-
👍 @ploupipoulpi, the target idea I described here: #590 for least end-user pain. Cool you're experiminting with python/scripting, this is always a path to learn useful stuff. BTW we have also About another script method...the "start" button on a device is a RETURN keyboard key and frankly I don't think you can swap it with another - that is if operating on a pure shell. Anyway not a python guy here. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I was playing around making a color theme selection menu for LGPT and I felt like the apps menu is quite full now with the various USB scripts.
So I adapted what I was doing and came up with a little menu selection that allows me to have only one link to this in the menu istead of USB HID, USB MTD, USB HOST, USB SERIAL and JOYMAP
As I couldn't find a way to capture A and B from the shell, using python might be overengineering (although I did rely on gpt a lot) but it works fine.
List of paths and names to be stored in a text file, menu displays the list, A or start to run, B to quit.
Thanks a lot to Apaczer for all the right info, that helped a lot. The tty hack you pointed me to can be used in many ways.
I experimented with st as well but it doesn't look as good.
I wish I had an easier way to capture A and B presses, as it takes a second to display the menu as it imports "keyboard" in python I guess.
I have an equivalent working script without python that loads instantly and looks slightly snappier, but it only works with the start button.
If you know of a better way, let me know! In any case, even with the 1s loading at launch I like that better than an apps menu with a lot of USB related tools (plus it makes making a new theme easier, less backdrops for a gameshow like theme)
usblinks.txt to be formatted
linkname1 path1
linkname2 path2
..
linknamen pathn
Script is launched through normal gmenu link such as:
title=testpython
description=testpython
exec=/mnt/testscript.sh
Beta Was this translation helpful? Give feedback.
All reactions