Code Monkey home page Code Monkey logo

nickelmenu's Introduction

NickelMenu

The easiest way to launch custom scripts, change hidden settings, and run actions on Kobo eReaders.

See the website and thread on MobileRead for screenshots and more details.

Installation

You can download pre-built packages of the latest stable release from the releases page, or you can find bleeding-edge builds of each commit from here.

After you download the package, copy KoboRoot.tgz into the .kobo folder of your eReader, then eject it.

After it installs, you will find a new menu item named NickelMenu with further instructions which you can also read here.

To uninstall NickelMenu, just create a new file named uninstall in .adds/nm/, or trigger the failsafe mechanism by immediately powering off the Kobo after it starts booting.

Most errors, if any, will be displayed as a menu item in the main menu. If no new menu entries appear here after a reboot, try reinstalling NickelMenu. If that still doesn't work, connect over telnet or SSH and check the output of logread.

Compiling

NickelMenu is designed to be compiled with NickelTC. To compile it with Docker/Podman, use docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint=make --rm -it ghcr.io/pgaskin/nickeltc:1.0 all koboroot. To compile it on the host, use make CROSS_COMPILE=/path/to/nickeltc/bin/arm-nickel-linux-gnueabihf-.

nickelmenu's People

Contributors

baskerville avatar niluje avatar onatbas avatar pgaskin avatar shermp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nickelmenu's Issues

Library menu

This would be better suited for things like nickel_misc:rescan_books{,_full} to avoid cluttering the main menu.

Cannot exit Web Browser in 4.23.15505

On my Kobo Forma for example, if I use the NickelMenu to open the Web browser, I now cannot close it unless I restart my device because it starts in full screen and no back or quit button is available.

When started from the Beta features menu, the web browser starts in a pop-up window with back and close buttons.

Improved nickel_extras:web_browser action

  • Option to show in a modal instead of fullscreen.
  • Option to load a custom URL.
  • Option to add a custom CSS override.

I've figured out the issue with the original attempt I abandoned a while ago:

https://github.com/geek1011/NickelMenu/blob/50c7374fcf8c86fe809129a4a10def601ecfe248/src/action_cc.cc#L319-L334

When it isn't already connected to a network, BrowserWorkflowManager::openBrowser will use the WirelessWorkflowManager sharedInstance to start the connection and attach a one-time (it removes itself after) signal handler which runs BrowserWorkflowManager::openBrowserAfterConnected on success (InternetProvider::internetIsAccessible). The thing is, it stores the state information in the BrowserWorkflowManager instance, and passes the pointer to it as-is to the signal handler.

Since my original attempt allocated the objects on the stack, this meant that it would try and dereference an invalid stack pointer after the connection succeeds. To fix this, all we need to do is allocate the BrowserWorkflowManager and the function arguments on the heap.

Set NM_CONFIG_DIR from the Makefile

I don't recommend changing it, but some people have custom private builds which do. This will also make the documentation go into the correct place when installing.

Choose the menu insertion points?

I was wondering if it would be possible to add the ability to choose where the menu items are inserted? Or to have better defaults: ideally the new items should be isolated from the existing items by a black separator. Looking at the code, I'm starting to think that you simply don't have a choice?

Proposal: refactor actions in action_cc into standalone functions

Currently the code that actually executes nickel actions are intertwined with the menu/config code. However it could be useful to refactor them into standalone functions, such that they could easily be reused by other libraries.

From my look through the code, it looks like each segment of code is fairly self-contained already, so it doesn't look like the refactor would be too difficult.

I'm willing to take a stab at it if @geek1011 is open to the idea.

menu hopping

One of my greatest irritations in latest firmwares is the removal of the "home" button from the reading screen. Sometimes I have to hit return two or three times to get back to home.

Would it be possible to add items from the home screen menu (like home, my books, my articles, settings) so they could be added to the reading overflow menu?

Should the failsafe destroy thread be detached?

AFAIK, the default state of a pthread is joined.

Not waiting for it means it "leaks" on termination.

Should we make it detached to take care of that, or am I missing some Qt quirk?

(I can take care of & test that, just wanted to double-check first ;)).

Rename chain to chain_success

In hindsight, chain was a bad choice of name due to the changes in #20. One potential way to fix this while keeping backwards-compatibility would be to rename it to chain_success, but continue accepting chain. I would probably remove chain completely sometime before v1.0.0, though.

See #32 (comment).

feature request - orientation toggle

First of all i wanted to say thank you for taking your time to develop this and well done. I have a small feature request if possible please.

I have added the ForceAllowLandscape=true parameter in the kobo config file which enabled portrait or landscape mode, but i would also like to have inverted landscape and inverted portrait as an option also as an option. This seems to be possible to do so as it is found in the Developer options menu.

Would it be possible to have a rotation flag added please? or even the possibility of adding the Developer options section in the home screen?

Thanks in advance,
STiiVO

Add a confirmation dialog?

I thought it might be useful to have a confirmation dialog with at least two buttons.

Maybe the cancel dialog that shows up in the output of: arm-linux-gnueabihf-objdump -T libnickel.so | grep -i 'confirm.*show.*dialog' (that is _ZN25ConfirmationDialogFactory16showCancelDialogERK7QStringS2_) could fulfill this task?

Generalize `chain`?

The current behavior is to abort a chain of actions on the first failure.

Would it be possible to introduce the following variants of chain:

  • and_then: only executes if the last executed action succeeded.
  • or_else: only executes if the last executed action failed.

Testing NickelMenu 0.2.0

You asked for some testing feedback so here's mine.

Good news: I only have simple menu options. Everything I want is now working OK.

Not-so-good news:
During my testing (on a KA1) I did have a problem which I was able to reproduce several times.

This is my config file:

menu_item : main : * Reboot              : power : reboot
menu_item : main : * Rescan books        : nickel_misc : rescan_books
menu_item : main : * Screenshots on      : nickel_setting : screenshots:true
menu_item : main : * Screenshots del/off : cmd_output : 500:rm -v /mnt/onboard/screen_*.png
  chain_success : nickel_misc    : rescan_books
  chain_always  : nickel_setting : screenshots:false
menu_item : main : * USBconnect          : nickel_misc : force_usb_connection

menu_item : reader : > Home             : nickel_misc : home
menu_item : reader : > My Books         : nickel_open : library:library2
menu_item : reader : * Invert Screen    : nickel_setting : invert
menu_item : reader : * Reboot           : power : reboot
menu_item : reader : * Screenshots on   : nickel_setting : screenshots:true
menu_item : reader : * USBconnect       : nickel_misc : force_usb_connection

These were the steps to reproduce the problem using the above config:

  • From Home menu select * USBconnect
  • Edit NM config file on Kobo and save.
  • Eject safely.
  • Open a kepub.
  • From reader menu select * Screenshots on
  • Take a screenshot.
  • From reader menu select > Home
  • From Home menu select * Rescan books just to prove the screenshot exists.

At this point the KA1 freezes and reboots. After this everything is OK.

I don't know if this is any help but this stack log was created:

OH THE HUMANITY!
pid: 724, tid: 724 (nickel), rev: efcb227b40228eba2d7cd9565e892f19332faf16
  >>> /usr/local/Kobo/nickel <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000028
 r0 016a9360  r1 00000000  r2 00000000  r3 302f82c8
 r4 00000028  r5 00000000  r6 302e2d5c  r7 00000001
 r8 00000021  r9 7eefeddc  10 302e332c  fp 302e32f8
 ip 000000f4  sp 7eefec68  lr 302db8d3  pc 302db454  cpsr 20070030
    #00 sp: 0x7eefec68 ip: 0x302db454  /usr/local/Kobo/imageformats/libnm.so: _Z15nm_menu_item_doP14nm_menu_item_t+0x63
    #01 sp: 0x7eefecd0 ip: 0x302db8d3  /usr/local/Kobo/imageformats/libnm.so: _ZN9QtPrivate18QFunctorSlotObjectIZ15_nm_menu_injectPvP5QMenu18nm_menu_location_tiEUlbE_Li1ENS_4ListIIbEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPS1_Pb+0x4a
    #02 sp: 0x7eefece8 ip: 0x2ea3d7d5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN11QMetaObject8activateEP7QObjectiiPPv+0x1dc
    #03 sp: 0x7eefed98 ip: 0x2ddd4ff1  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN7QAction9triggeredEb+0x24
    #04 sp: 0x7eefedc0 ip: 0x2ddd6e2b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN7QAction8activateENS_11ActionEventE+0x9a
    #05 sp: 0x7eefedd8 ip: 0x2b6e655b  /usr/local/Kobo/libnickel.so.1.0.0: _ZN22AbstractMenuController10tapGestureEP15GestureReceiverP10TapGesture+0xd6
    #06 sp: 0x7eefee18 ip: 0x2b6b9a33  /usr/local/Kobo/libnickel.so.1.0.0: _ZN15GestureReceiver21sendGestureToDelegateEP13QGestureEventP15GestureDelegate+0xd6
    #07 sp: 0x7eefee38 ip: 0x2ddd9b83  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x56
    #08 sp: 0x7eefee50 ip: 0x2dddf575  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN12QApplication6notifyEP7QObjectP6QEvent+0xfd8
    #09 sp: 0x7eefefb0 ip: 0x2b955b2f  /usr/local/Kobo/libnickel.so.1.0.0: _ZN18Nickel3Application6notifyEP7QObjectP6QEvent+0x32
    #10 sp: 0x7eefefe0 ip: 0x2ea1c9c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x84
    #11 sp: 0x7eeff010 ip: 0x2de15681  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN18QGestureRecognizer20unregisterRecognizerEN2Qt11GestureTypeE+0x34f0
    #12 sp: 0x7eeff0d8 ip: 0x2de1641f  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN18QGestureRecognizer20unregisterRecognizerEN2Qt11GestureTypeE+0x428e
    #13 sp: 0x7eeff188 ip: 0x2de16b39  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN18QGestureRecognizer20unregisterRecognizerEN2Qt11GestureTypeE+0x49a8
    #14 sp: 0x7eeff1d0 ip: 0x2ddde63d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN12QApplication6notifyEP7QObjectP6QEvent+0xa0
    #15 sp: 0x7eeff330 ip: 0x2b955b2f  /usr/local/Kobo/libnickel.so.1.0.0: _ZN18Nickel3Application6notifyEP7QObjectP6QEvent+0x32
    #16 sp: 0x7eeff360 ip: 0x2ea1c9c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x84
    #17 sp: 0x7eeff390 ip: 0x2dde09bf  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN19QApplicationPrivate22translateRawTouchEventEP7QWidgetP12QTouchDeviceRK5QListIN11QTouchEvent10TouchPointEEm+0x996
    #18 sp: 0x7eeff450 ip: 0x2de247b1  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZThn8_NK7QWidget6metricEN12QPaintDevice17PaintDeviceMetricE+0x2e38
    #19 sp: 0x7eeff4d0 ip: 0x2ddd9b83  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x56
    #20 sp: 0x7eeff4e8 ip: 0x2ddde9bf  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN12QApplication6notifyEP7QObjectP6QEvent+0x422
    #21 sp: 0x7eeff648 ip: 0x2b955b2f  /usr/local/Kobo/libnickel.so.1.0.0: _ZN18Nickel3Application6notifyEP7QObjectP6QEvent+0x32
    #22 sp: 0x7eeff678 ip: 0x2ea1c9c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x84
    #23 sp: 0x7eeff6a8 ip: 0x2e5a829d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtGui.so.4.6.2: _ZN22QGuiApplicationPrivate17processTouchEventEPN29QWindowSystemInterfacePrivate10TouchEventE+0xd50
    #24 sp: 0x7eeff818 ip: 0x2e5a9f09  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtGui.so.4.6.2: _ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE+0x18c
    #25 sp: 0x7eeff850 ip: 0x2e598797  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtGui.so.4.6.2: _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x1e
    #26 sp: 0x7eeff860 ip: 0x300b9487  /usr/local/Kobo/platforms/libkobo.so: _ZN13QFontEngineFT19alphaRGBMapForGlyphEj6QFixedRK10QTransform+0xf3a
    #27 sp: 0x7eeff870 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #28 sp: 0x7eeff8a8 ip: 0x2ea201e9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN16QCoreApplication4execEv+0x58
    #29 sp: 0x7eeff8d8 ip: 0x0001e609  /usr/local/Kobo/nickel: main+0xcb8
    #30 sp: 0x7eeffa98 ip: 0x2fd2f5d8  /lib/libc-2.11.1.so: __libc_start_main+0x114
    #31 sp: 0x7eeffbe8 ip: 0x0001eb7d  /usr/local/Kobo/nickel: _start+0x20
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1369
 r0 00000006  r1 30b0ad80  r2 00000000  r3 00000000
 r4 00000000  r5 00000020  r6 30b0ad80  r7 0000008e
 r8 2ebf7f38  r9 00000000  10 01495fb0  fp 00000000
 ip 00000000  sp 30b0ad60  lr 30b0b910  pc 2fde5eb4  cpsr 800e0010
    #00 sp: 0x30b0ad60 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x30b0ad70 ip: 0x2e9d4d3d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN9QLockFile6unlockEv+0x17e4
    #02 sp: 0x30b0ae28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #03 sp: 0x30b0ae50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #04 sp: 0x30b0af90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1377
 r0 0000000e  r1 31600560  r2 31600770  r3 31600980
 r4 00000000  r5 00000000  r6 0000000e  r7 0000008e
 r8 31600560  r9 31600770  10 31600980  fp 31600468
 ip 00000000  sp 314fec40  lr 314ff910  pc 2fde5eb4  cpsr 80000010
    #00 sp: 0x314fec40 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x314fec50 ip: 0x2ea567fb  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _Z14qt_safe_selectiP6fd_setS0_S0_PK8timespec+0x172
    #02 sp: 0x314feca0 ip: 0x2ea57d1d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP8timespec+0xdc
    #03 sp: 0x314feda0 ip: 0x2ea581c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xe8
    #04 sp: 0x314fedc8 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #05 sp: 0x314fee00 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #06 sp: 0x314fee28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #07 sp: 0x314fee50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #08 sp: 0x314fef90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1379
 r0 0000000c  r1 014d5008  r2 014d5218  r3 014d5428
 r4 00000000  r5 00000000  r6 0000000c  r7 0000008e
 r8 014d5008  r9 014d5218  10 014d5428  fp 014a7380
 ip 00000000  sp 31efec40  lr 31eff910  pc 2fde5eb4  cpsr 80070010
    #00 sp: 0x31efec40 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x31efec50 ip: 0x2ea567fb  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _Z14qt_safe_selectiP6fd_setS0_S0_PK8timespec+0x172
    #02 sp: 0x31efeca0 ip: 0x2ea57d1d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP8timespec+0xdc
    #03 sp: 0x31efeda0 ip: 0x2ea581c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xe8
    #04 sp: 0x31efedc8 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #05 sp: 0x31efee00 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #06 sp: 0x31efee28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #07 sp: 0x31efee50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #08 sp: 0x31efef90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1408
 r0 0000001d  r1 35b519a0  r2 00000000  r3 00000000
 r4 00000000  r5 35b51a20  r6 30be4d68  r7 0000008e
 r8 31603c70  r9 35b51960  10 30be4f54  fp 35b51a20
 ip 00000000  sp 35b51908  lr 35b52910  pc 2fde5eb4  cpsr 80070010
    #00 sp: 0x35b51908 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x35b51918 ip: 0x30be1ec5  /usr/local/Kobo/generic/libkevdevtouch.so: _ZN24QEvdevTouchScreenHandler8readDataEv+0x8c
    #02 sp: 0x35b51a48 ip: 0x2ea469d7  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN15QSocketNotifier5eventEP6QEvent+0x1f2
    #03 sp: 0x35b51a68 ip: 0x2ea3e599  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QObject5eventEP6QEvent+0xd0
    #04 sp: 0x35b51b48 ip: 0x2ddd9b83  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x56
    #05 sp: 0x35b51b60 ip: 0x2ddde9bf  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWidgets.so.4.6.2: _ZN12QApplication6notifyEP7QObjectP6QEvent+0x422
    #06 sp: 0x35b51cc0 ip: 0x2b955b2f  /usr/local/Kobo/libnickel.so.1.0.0: _ZN18Nickel3Application6notifyEP7QObjectP6QEvent+0x32
    #07 sp: 0x35b51cf0 ip: 0x2ea1c9c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x84
    #08 sp: 0x35b51d20 ip: 0x2ea5943d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN14QTimerInfoList14activateTimersEv+0x400
    #09 sp: 0x35b51d88 ip: 0x2ea581b7  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xd6
    #10 sp: 0x35b51db0 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #11 sp: 0x35b51de8 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #12 sp: 0x35b51e10 ip: 0x30be40cd  /usr/local/Kobo/generic/libkevdevtouch.so: _ZN30QEvdevTouchScreenHandlerThread3runEv+0x58
    #13 sp: 0x35b51e28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #14 sp: 0x35b51e50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #15 sp: 0x35b51f90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1418
 r0 0000001f  r1 30c00cc0  r2 30c00ed0  r3 30c010e0
 r4 00000000  r5 00000000  r6 0000001f  r7 0000008e
 r8 30c00cc0  r9 30c00ed0  10 30c010e0  fp 30c00bc8
 ip 00000000  sp 36351c40  lr 36352910  pc 2fde5eb4  cpsr 800f0010
    #00 sp: 0x36351c40 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x36351c50 ip: 0x2ea567fb  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _Z14qt_safe_selectiP6fd_setS0_S0_PK8timespec+0x172
    #02 sp: 0x36351ca0 ip: 0x2ea57d1d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP8timespec+0xdc
    #03 sp: 0x36351da0 ip: 0x2ea581c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xe8
    #04 sp: 0x36351dc8 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #05 sp: 0x36351e00 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #06 sp: 0x36351e28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #07 sp: 0x36351e50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #08 sp: 0x36351f90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1421
 r0 0000001b  r1 31600f10  r2 31601120  r3 31601330
 r4 00000000  r5 00000000  r6 0000001b  r7 0000008e
 r8 31600f10  r9 31601120  10 31601330  fp 31600e18
 ip 00000000  sp 326fec40  lr 326ff910  pc 2fde5eb4  cpsr 80070010
    #00 sp: 0x326fec40 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x326fec50 ip: 0x2ea567fb  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _Z14qt_safe_selectiP6fd_setS0_S0_PK8timespec+0x172
    #02 sp: 0x326feca0 ip: 0x2ea57d1d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP8timespec+0xdc
    #03 sp: 0x326feda0 ip: 0x2ea581c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xe8
    #04 sp: 0x326fedc8 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #05 sp: 0x326fee00 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #06 sp: 0x326fee28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #07 sp: 0x326fee50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #08 sp: 0x326fef90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1612
 r0 00000027  r1 30c02870  r2 30c02a80  r3 30c02c90
 r4 00000000  r5 00000000  r6 00000027  r7 0000008e
 r8 30c02870  r9 30c02a80  10 30c02c90  fp 30c01438
 ip 00000000  sp 32efec40  lr 32eff910  pc 2fde5eb4  cpsr 80070010
    #00 sp: 0x32efec40 ip: 0x2fde5eb4  /lib/libc-2.11.1.so: __select+0x44
    #01 sp: 0x32efec50 ip: 0x2ea567fb  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _Z14qt_safe_selectiP6fd_setS0_S0_PK8timespec+0x172
    #02 sp: 0x32efeca0 ip: 0x2ea57d1d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP8timespec+0xdc
    #03 sp: 0x32efeda0 ip: 0x2ea581c9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0xe8
    #04 sp: 0x32efedc8 ip: 0x2ea1b30b  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe6
    #05 sp: 0x32efee00 ip: 0x2e8a65b5  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread4execEv+0x60
    #06 sp: 0x32efee28 ip: 0x2e8a977d  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2: _ZN7QThread21setTerminationEnabledEb+0x218
    #07 sp: 0x32efee50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #08 sp: 0x32efef90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1932
 r0 2dcfb004  r1 00000080  r2 00000003  r3 00000000
 r4 00000003  r5 2dcfb000  r6 00000000  r7 000000f0
 r8 00000000  r9 2dcfafe8  10 00000000  fp 35351df4
 ip 35351d7c  sp 35351d90  lr 35352910  pc 2fb867b8  cpsr 800f0010
    #00 sp: 0x35351d90 ip: 0x2fb867b8  /lib/libpthread-2.11.1.so: pthread_cond_wait+0x154
    #01 sp: 0x35351df8 ip: 0x2d8f3aad  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xaf4
    #02 sp: 0x35351e48 ip: 0x2d8f3ae9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xb30
    #03 sp: 0x35351e58 ip: 0x2d8f3ae9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xb30
    #04 sp: 0x35352460 ip: 0x2d8f3ae9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xb30
    #05 sp: 0x00000010 ip: 0x2d8f3ae9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xb30
    #06 sp: 0x0000000f ip: 0x2d8f3ae9  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF8Internal21fastMallocMatchFailedEPv+0xb30
    #07 sp: 0x0000000f ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
pid: 724, tid: 1936
 r0 38313144  r1 00000080  r2 0000000f  r3 00000000
 r4 0000000f  r5 38313140  r6 00000000  r7 000000f0
 r8 00000000  r9 38313124  10 00000000  fp 3a7c0e14
 ip 3a7c0d9c  sp 3a7c0db0  lr 3a7c1910  pc 2fb867b8  cpsr 800f0010
    #00 sp: 0x3a7c0db0 ip: 0x2fb867b8  /lib/libpthread-2.11.1.so: pthread_cond_wait+0x154
    #01 sp: 0x3a7c0e18 ip: 0x2d6e2775  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3JSC9HandleSet12writeBarrierEPNS_7JSValueERKS1_+0x724
    #02 sp: 0x3a7c0e40 ip: 0x2d918dab  /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtWebKit.so.4.6.2: _ZN3WTF11OSAllocator18releaseDecommittedEPvj+0xe2
    #03 sp: 0x3a7c0e50 ip: 0x2fb80e50  /lib/libpthread-2.11.1.so: __pthread_get_minstack+0x1610
    #04 sp: 0x3a7c0f90 ip: 0x2fdecfb0  /lib/libc-2.11.1.so: clone+0x80
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Recorded last user operations: 
last user operation[7]: appStart 
last user operation[6]: mainNavOption 
last user operation[5]: homeWidgetClick
last user operation[4]: openContentRela
last user operation[3]: readerShown 
last user operation[2]: readingMenu 
last user operation[1]: home 
last user operation[0]: readerHidden 
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

feature request- random book

First, I love Nickel Menu. Thank you for making this real.

I would really like to have a "Random Book" option.

Is this possible?

Whitespace inconsistency in cmd_spawn/cmd_output is confusing

In cmd_output and and cmd_spawn, the "timeout" and "quiet" fields respectively are whitespace sensitive. This is inconsistent with the rest of the config line, which ignores whitespace.

Perhaps this either needs to be better documented, or the actions should ignore whitespace for those fields, the same as what the config parser does.

I got bit with this myself when I was wondering why the following failed:

menu_item : main : Test Output : cmd_output : 1000 : echo Hello

(Note it fails saying there is no valid timeout)

Documentation: instruct exactly how to start/spawn Koreader

Hi, thank you for your work in this very usefull tool.
I have 3 suggestions for making the documentation crystal clear and
more straightforward for first time users. Maybe this all seems pointless and "obvious"
to you, because you're the creator and are already intimate with Nickelmenu.

  1. The name you choose for the file, "doc" is a little bit confusing.

It took me a while to realize that this file is both a "doc" in the sense of containing
instructions, and a "config" file, in the sense that you comment out what you want
to configure the menu.

Yes, of course, it's all written there. You can even name it what you want, split it etc.
But either I'm getting too old or I feel it could be made more intuitive this way.

Maybe you could rename it into Readme.txt and place it in a folder called "docs" or "help" under the folder "nm" ?

Then create a file called nm.config or nm.config.example with just a couple lines.
Only the most importat lines and commented out.

  1. More crystal clear what you get on the "box"

You do have it on the README front page:

After it installs, you will find a new menu item named NickelMenu with further instructions which you can also read here.

"Here" also means, the "doc" file is also placed on the Kobo device itself, so could you please update the README to be less confusing for first time users. Something like:

After it installs, you will find a new menu item named NickelMenu.
A file named "doc" was placed under ".adds/nm/" with further instructions.
You can also read that file online, https://github.com/pgaskin/NickelMenu/blob/master/res/doc

  1. Koreader

I guess the number one reason most people install it,
is to use it also with Koreader.

You do document extensivly how to customize the menus.
It's a big file, with examples for telnet and everything.

But not a single line on how to "correctly" start Koreader !
Please also remember, that not everyone wants the install the Koreader version prebundled with Nickelmenu and Kfmon.

I currently start Koreader from Nickelmenu with:

menu_item :main :Start Ko spawn :cmd_spawn :/mnt/onboard/.adds/koreader/koreader.sh

But I am not 100 % sure . I would like to see it written by you in the example config.
I dont' want to be jumping from the example file or the docs to forum postings on mobileread and back to the docs for such an important thing.

Please dont force people to go online to the forum to get ideas how to customize Nickel Menu for basic things. Documentation should be self contained and offline.

If you have other cool examples, put them also in the docs distributed.

Thanks in advance

Set reading font/size/margins/spacing/justification

This would be quite useful when combined with chain_* for having different presets to switch between. It would also allow setting sizes/margins/spacing outside the slider range, which can sometimes be useful.

I haven't looked into how feasible/stable/version-agnostic this would be yet. In particular, I need to look into when the reader view is updated, how this will interact with different file formats (i.e. if I can detect if the setting isn't supported for the current file format), and whether these actions will need to be disabled for non-reader menus.

An action to display the current settings will also be necessary to make it easier for users to figure out the current settings.

Automatic symbol checking

I should probably add a simple tool to check if symbols exist on all supported firmware versions.

Introduce a 'cmd_wait' action

I was thinking it might be useful to have a cmd_wait (or whatever it needs to be called) action. I'm thinking such an action would behave like cmd_output, except not output a message to the user to dismiss.

Use cases might be waiting for a process to come up that was launched via cmd_spawn, or introducing a delay between chain items etc.

The quck'n'dirty way to do this would be to copy the cmd_output function, rename it, remove the "output" portion, and call it a day.

The proper way to do it would be to factor out the common code to a separate function, but then I run into the same headscratcher as @NiLuJe found, namely, how to work with the whole macro return stuff...

Don't notify if `cmd_spawn` succeeds?

I'd rather not have a notification if cmd_spawn succeeds. (I won't mind a notification on failure tough.)

Maybe it could be left to the user to implement such a logic? Using the concepts mentioned in #11, it could be written as:

menu_item  :main  :Hello  :cmd_spawn  :echo Hello
and_then                  :dbg_toast  :The previous action was successful.

wifi toggle

I'd like an action to toggle Nickel's idea of wifi state.
I don't mean turning off the interface (ifconfig down) but actually disabling it (or I suppose enabling it) like the icon was tapped from the home screen and the slider moved...

I'd love to be able to get to this from the reading screen without popping all the way back to the home screen.

Would this be possible? If so, my kobo's battery would thank you!!

Config parser improvements

  • Split scanning and parsing.
  • Free memory properly even during errors.
  • Extract the gigantic parser function.
  • Re-use memory where possible.
  • Better error handling.
  • Cleaner and more readable code around memory management and list stuff.
  • Make it easier to extend.

Deprecate nickel_open:library:library in favor of nickel_open:library:library2

Since 4.23.15505, it isn't safe to use LibraryNavMixin::showLibrary directly anymore, and upon further investigation, it appears that it was never intended to be used directly to begin with and that it only worked by chance.

library, which uses LibraryNavMixin::showLibrary will be deprecated in favor of library2, which uses LibraryNavMixin::showLastLibraryTab. Since these are almost identical in behavior (the only difference is that showLibrary didn't set the library tab), I will be making library a synonym for library2 in v0.3.2, then completely removing library2 in v0.4.0.

See #79 (comment).

Initial feedback

@geek1011,
Very nice. I'll use this new toy ๐Ÿ˜ƒ A few discussion points in no particular order:

  • depending on the ability of the target audience perhaps a default config file (/mnt/onboard/.adds/nm/mystuff) could be included in the KoboRoot.tgz installation file. Non-techie users get a bit panicky if nothing obvious happens after a new install. The one you suggested I try from the other thread should be harmless, or, if screenshots is a bit niche for the average user, maybe just the last line for invert?
menu_item:main:Screenshots:nickel_setting:screenshots
menu_item:reader:Screenshots:nickel_setting:screenshots
menu_item:reader:Invert Screen:nickel_setting:invert
  • I think I'll stop using the InvertScreen option in kobopatch in favour of this NickelMenu version. The kobopatch version has that minor niggle of the Reader settings checkbox being in the wrong state after powering off whilst inverted. The NickelMenu version seems to survive reboot OK and it also seems to play nicely with my MiniClock hack when toggling the invert state.

  • There is one minor intermittent gremlin I'll mention. Sometimes when toggling the invert state the 'Invert Screen' menu item itself remains on screen. It stands out like a sore thumb because it's either a white box on a mainly black screen or a black box on a mainly white screen. It doesn't particularly bother me because it's removed when you have to refresh the screen to remove the scrubber etc.

Chain skipping

It would be useful to add an action to skip a number of following actions. This would allow for logic similar to grouping chained actions, but without the complexity which goes with it.

This was inspired by the chaining in PAM's config files.

NickelMenu v0.2.0 error in nickel_setting screenshot confirmation pop-up

Although this config entry works:

menu_item : main : * Screenshots on : nickel_setting : enable : screenshots

it has an error in the confirmation pop-up message. I assume it should say something like enabled screenshots but instead it's enabled enable. Similarly the disable screenshots option pops up disabled disable

Experimental options

I will be adding support for experimental options to the config file. These options will not be subject to the compatibility guarantees between NM versions, or the stability requirements for other NM features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.