1
0
Files
NickelMenu-custom/res/doc
shermp ff6c38b2da Implemented action chaining
commit d4e71cdd21347d1d64ef59de4c8bc0afaf775523
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:52:26 2020 +1200

    Log when action is run

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit 6533e8cc6a74a0b7246334b4712a96d678aefcd0
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:32:28 2020 +1200

    Fixed field numbers in 'chain' error messages

    Fixes the consequences of copy & paste

commit 9c4311ce5b1eb01b81a18cc19b39025514ba6be4
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:27:30 2020 +1200

    Simplified nm_config_push_action()

    The previous implementation was a bit... convoluted

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit e17509a85f1f125e3be4386966d37452c970f8a5
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 16:29:46 2020 +1200

    Config parser tweaks based on review

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit fbea6709ffb3cc755d01bdb7ba3ed06fc901aca5
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 15:23:22 2020 +1200

    Small documentation tweak

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit adbfc4b8edd84ca8ce381b0d4a306678f7039be1
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 15:12:49 2020 +1200

    Fix config error segfault

    Allocating some memory helps...

commit a0eb89598a74df1e7937c8615c4a4d7d1d17101b
Merge: 17d6e90 7491a97
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 14:48:06 2020 +1200

    Merge branch 'master' into pre-hook-exp2

commit 17d6e90d62df4b754967d2f2ea94f0d29aa8786d
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:52:41 2020 +1200

    Change loop as suggested

commit fa16f123b6c08fce88227f74b75aa2b1983bef65
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:50:54 2020 +1200

    Initial config parsing implementation for chain

commit d4648c424cd4c79aece73d10549c57a91a49366a
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:09:58 2020 +1200

    Add initial chain documentation

commit fc85239500cb892ee9ecd20c370e664007446d8f
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:02:31 2020 +1200

    Fix broken loop

commit ce71679a42f1fe7f82f9df68e862e6af2f57c18e
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 10:14:59 2020 +1200

    (WIP) Added nm_menu_action_t for action chaining.

    Note: this commit will NOT compile
2020-04-25 21:13:42 -04:00

79 lines
4.5 KiB
Plaintext

# NickelMenu (libnm.so)
#
# This tool injects menu items into Nickel.
#
# It should work on firmware 4.6+, but it has only been tested on 4.20.14622. It
# is perfectly safe to try out on any newer firmware version, as it has a lot of
# error checking, and a failsafe mechanism which automatically uninstalls it as
# a last resort.
#
# Place your configuration files in this folder (/mnt/onboard/.adds/nm). They
# can be named anything, and should consist of multiple lines either starting
# with # for a comment, or in the the following format:
#
# menu_item:<location>:<label>:<action>:<arg>
# Adds a menu item (spaces around fields are ignored).
# chain:<action>:<arg>
# Adds an action to the chain that began with the preceeding menu_item.
# Actions are performed in the order they are written in the config order.
# chain lines MUST follow the menu_item they are attached to. A new menu_item
# marks the start of the next chain.
#
# <location> the menu to add the item to, one of:
# main - the menu in the top-left corner of the home screen
# reader - the overflow menu in the reader
# <label> the label to show on the menu item (must not contain :)
# <action> the type of action to run, one of:
# dbg_syslog - writes a message to syslog (for testing)
# dbg_error - always returns an error (for testing)
# dbg_msg - shows a message (for testing)
# dbg_toast - shows a toast (for testing)
# kfmon - triggers a kfmon action (TODO)
# nickel_setting - toggles a boolean setting
# nickel_extras - opens one of the beta features
# nickel_misc - other stuff which isn't significant enough for its own category
# cmd_spawn - starts another process or script in the background
# cmd_output - runs a command and displays the output
# <arg> the argument passed to the action:
# dbg_syslog - the text to write
# dbg_error - the error message
# dbg_msg - the message
# dbg_toast - the message
# kfmon - TODO
# nickel_setting - one of:
# invert - toggles FeatureSettings.InvertScreen (all versions)
# lockscreen - toggles PowerSettings.UnlockEnabled (4.12.12111+)
# screenshots - toggles FeatureSettings.Screenshots (all versions)
# nickel_extras - the mimetype of the plugin, or one of:
# web_browser
# unblock_it
# sketch_pad
# solitaire
# sudoku
# word_scramble
# nickel_misc - one of:
# force_usb_connection - forces a usb connection dialog to be shown
# rescan_books - forces nickel to rescan books
# rescan_books_full - forces a full usb connect/disconnect cycle
# cmd_spawn - the command line to pass to /bin/sh -c (started in /)
# cmd_output - the timeout in milliseconds (0 < t < 10000), a colon, then the command line to pass to /bin/sh -c (started in /)
#
# For example, you might have a configuration file in KOBOeReader/.adds/nm/mystuff like:
#
# menu_item :main :Show an Error :dbg_error :This is an error message!
# menu_item :main :Do Nothing :cmd_spawn :sleep 60
# menu_item :main :Kernel Version :cmd_output :500:uname -a
# menu_item :main :Sketch Pad :nickel_extras :Sketch Pad
# menu_item :reader :Invert Screen :nickel_setting :invert
#
# You will need to reboot to see any changes.
#
# If there is a error in the configuration, an item which displays it will be
# added to the main menu. If an internal error occurs, it is written to syslog,
# which can be viewed over telnet or SSH (the username is root) with the command
# logread.
#
# To uninstall NickelMenu, create a file named KOBOeReader/.adds/nm/uninstall,
# or manually uninstall it by deleting libnm.so. You can also uninstall it by
# triggering the failsafe mechanism by turning your Kobo off within 20 seconds
# of turning it on.