I've added a display brightness control menu to dmenu on my Dingoo, which makes it possible to easily adjust the display backlight brightness. The brightness setting will be saved to disk and automatically loaded on boot.
Here is what I've done to accomplish this.
First I have created two shell scripts. One for saving the new brightness setting (brightness.save
) and another for actually adjusting the brightness (brightness.set
). Both files need to be in the local/sbin
brightness.save (56 bytes)
brightness.set (138 bytes)
Then I have added a new submenu to my dmenu.cfg with menu entries for various brightness settings (10 %, 25 %, 33 %, 50 %, 66 %, 75 %, 100 %). I have used a light bulb image
as the menu icon. It needs to be in the res
directory inside the dmenu folder.