# Key bindings for brightness control using `brightnessctl`. # Displays a notification with the current value if /usr/bin/notify-send is available # # Brightness increase/decrease step can be customized by setting the `$brightness_step` # variable to a numeric value before including the file. # # Requires: brightnessctl >= 0.5.1-11 # Recommends: libnotify set $brightness_notification_cmd command -v notify-send >/dev/null && \ VALUE=$(brightnessctl --percentage get) && \ notify-send -e -h string:x-canonical-private-synchronous:brightness \ -h "int:value:$VALUE" -t 800 "Brightness: ${VALUE}%" bindsym XF86MonBrightnessDown exec \ 'STEP="$brightness_step" && brightnessctl -q set ${STEP:-5}%- && $brightness_notification_cmd' bindsym XF86MonBrightnessUp exec \ 'STEP="$brightness_step" && brightnessctl -q set +${STEP:-5}% && $brightness_notification_cmd'