i made a script to change display brightness with light and send a dunst notification that changes icon and progress bar level when/while changing brightness..

https://git.sr.ht/~e33io/dotfiles/tree/main/item/.local/bin/brightness.sh

example of display brightness notification while changing brightness..

#linux #opensource

Reply to this note

Please Login to reply.

Discussion

Nicely going! I might've gone with a second case statement and changed the values to 33 and 66, but if it works it works ✌️😊

i'm still learning.. ..what second case statement do you have in mind? ..as for the values, it seems pretty visually balanced with my specific laptop monitor, so other values might be better for other monitors

It's just a visual thing in the script, but switching the if statement for a case statement.

Ah, you've chosen the values based on brightness jumps in your screen? The reason I said 33 and 66 is because those are approximately ⅓ and ⅔ of 100 ✌️😅

thanks for the feedback, i will keep that in mind.. ..and yes, my screen has non-linear jumps in brightness, but at least it's super-easy to adjust those values on a per-laptop basis

so far i've kept an if statement, but i did simplify and clean this up a bit..

https://git.sr.ht/~e33io/dotfiles/tree/main/item/.local/bin/brightness.sh