YogaSMC icon indicating copy to clipboard operation
YogaSMC copied to clipboard

Feature request: Auto set backlight level based on activity

Open peddy22 opened this issue 2 years ago • 8 comments

can you use ioreg to detect idle and then set an option to auto-dim the keyboard when it's idle for 5s or more and re-enable once the activity manages? thanks

peddy22 avatar Jul 23 '22 20:07 peddy22

if not, could you possibly post the applescript to set the level to low/med/high and i will contribute the code for 'auto'. the codebase is too large for me to understand it.

peddy22 avatar Jul 23 '22 20:07 peddy22

ideally we'd use apple's io system but i'm not afraid of writing a shell script, i just need some pointers on where to start.

the defaults output for org.zhen.YogaSMC doesn't change if I change the option via the system tray applet.

peddy22 avatar Jul 27 '22 02:07 peddy22

The backlight could be controlled by ioio -s YogaVPC BacklightLevel level. Due to the constraint in Idea models, the backlight level will only stay at low when set by the driver. ThinkPad variant should be fine.

Also, I suppose it would be easier to implement it in the driver level. Currently YogaSMC ignores a message from VoodooPS2 which is used for VoodooI2C palm rejection on each keypress.

zhen-zen avatar Aug 01 '22 01:08 zhen-zen

Thanks, this should work nicely for my machine with a stock backlit keyboard

On Mon, 1 Aug 2022 at 1:59 PM, zhen-zen @.***> wrote:

The backlight could be controlled by ioio -s YogaVPC BacklightLevel level. Due to the constraint in Idea models, the backlight level will only stay at low when set by the driver. ThinkPad variant should be fine.

Also, I suppose it would be easier to implement it in the driver level. Currently YogaSMC ignores a message from VoodooPS2 which is used for VoodooI2C palm rejection on each keypress.

— Reply to this email directly, view it on GitHub https://github.com/zhen-zen/YogaSMC/issues/168#issuecomment-1200595543, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBXU3S76QH5GQ6A2UUHG6DVW4VPVANCNFSM54ORBDMA . You are receiving this because you authored the thread.Message ID: @.***>

-- Arno

peddy22 avatar Aug 01 '22 02:08 peddy22

@peddy22 Can you test the linked PR?

zhen-zen avatar Aug 11 '22 08:08 zhen-zen

Sure

On Thu, 11 Aug 2022 at 8:48 PM, zhen-zen @.***> wrote:

@peddy22 https://github.com/peddy22 Can you test the linked PR?

— Reply to this email directly, view it on GitHub https://github.com/zhen-zen/YogaSMC/issues/168#issuecomment-1211710547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBXU3WURF5AKMMME3QVPXTVYS46LANCNFSM54ORBDMA . You are receiving this because you were mentioned.Message ID: @.***>

-- Arno

peddy22 avatar Aug 11 '22 09:08 peddy22

Awesome, it looks like it works (you can disregard my comments on the PR).

Is there an option to hide the "Backlight on/Backlight off" OSD?

Thanks again! ^_^

peddy22 avatar Aug 12 '22 21:08 peddy22

Can you try the latest commit?

zhen-zen avatar Aug 14 '22 18:08 zhen-zen