Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Suggestion: Backlight Scroll #1411

Closed
Agvantibo opened this issue Jan 28, 2022 · 2 comments · Fixed by #1996
Closed

Feature Suggestion: Backlight Scroll #1411

Agvantibo opened this issue Jan 28, 2022 · 2 comments · Fixed by #1996
Labels
enhancement New feature or request

Comments

@Agvantibo
Copy link

Hello. The backlight module is nice, but there is no scroll by default. This is easily fixable by creating a helper script like so:

#!/bin/fish
set backlight_device $argv[1]
set action $argv[2]
set dvalue $argv[3]

echo Backlight device: $backlight_device Bumping: $action By: $dvalue

set current_value (cat $backlight_device)

if test $action = up
    echo (math $current_value + $dvalue) > $backlight_device
else if test $action = down
    echo (math $current_value - $dvalue) > $backlight_device
else
    exit 2
end

And prepending the module config with somthing like

        "interval" : 0.2,
        "device": "intel_backlight",
        "on-scroll-down": "backlight_delta /sys/class/backlight/intel_backlight/brightness down 50",
        "on-scroll-up": "backlight_delta /sys/class/backlight/intel_backlight/brightness up 50",

You are unable to see it from the screencast, but the level is actually changing:
https://mega.nz/file/ubgk1baZ#01vxMsjlZ4KRBI_weng8qg7SrIG7xHbCeNupLXd5xv0
It is probably even possible to minify/hardcode some stuff and make an easily insertable oneliner

@Agvantibo
Copy link
Author

Agvantibo commented Jan 28, 2022

There, I've recorded an unsettlingly lo-fi demo if the script in action: https://mega.nz/file/yOwGzDiQ#Y30rIKgcIldKcDUbPnC6bXYP6kYQxsUrwXpgrXp-zuA
(with my crappy webcam)

@Alexays Alexays added the enhancement New feature or request label Mar 8, 2022
@LukashonakV
Copy link
Contributor

Waybar v0.9.12
"on-scroll-up": "exec light -A 4", "on-scroll-down": "exec light -U 2"
works perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants