Quote:
Originally Posted by John F
This is what I did to toggle dark mode and set a light level:
Code:
menu_item :reader :Dark Mode On :nickel_setting :enable :dark_mode
chain_always :cmd_spawn : ioctl /dev/ntx_io 241 -v 10
menu_item :reader :Dark Mode Off :nickel_setting :disable :dark_mode
chain_always :cmd_spawn : ioctl /dev/ntx_io 241 -v 30
and it works.
|
Hi, I tried to change a bit with toggle options to only have one command as below:
Code:
menu_item :reader :Dark Mode on/off :nickel_setting :toggle :dark_mode
chain_success :cmd_spawn : ioctl /dev/ntx_io 241 -v 10
chain_success :skip :2
chain_failure :dbg_toast :Dark Mode switch!
chain_always :cmd_spawn : ioctl /dev/ntx_io 241 -v 30
It works, hope that the syntax is correct.
Note:
- the slider indicator didn't move according to the level of brightness setup.