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

feat: add slider widget #435

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

rtgiskard
Copy link

@rtgiskard rtgiskard commented Jun 9, 2024

For me, this makes it possible to control backlight with ddcutil:

"slider#backlight": {
	"label": "󰃟",
	"max_limit": 86,
	"min_limit": 1,
	"min": 0,
	"max": 100,
	"cmd_setter": "~/.config/hypr/script/utils.sh swaync_backlight set $value",
	"cmd_getter": "~/.config/hypr/script/utils.sh swaync_backlight get"
},
swaync_backlight() { # args: set|get [value]
	case "$1" in
	set) ddcutil setvcp 0x10 $2 ;;
	get) ddcutil getvcp 0x10 | grep -oP "current value =\s+\K[0-9]+" ;;
	esac
}

@rtgiskard rtgiskard changed the title add Slider feat: add slider widget Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant