You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
configs/dot.config/sway/config.d/60-bindings-brightness.conf

19 lines
854 B
Plaintext

# Key bindings for brightness control using `light`.
# 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: light
# Recommends: libnotify
set $brightness_notification_cmd command -v notify-send >/dev/null && \
VALUE=$(light) && VALUE=${VALUE%%.*} && \
notify-send -e -h string:x-canonical-private-synchronous:brightness \
-h "int:value:$VALUE" -t 800 "Brightness: ${VALUE}%"
bindsym XF86MonBrightnessDown exec \
'STEP="$brightness_step" && light -U ${STEP:-5} && $brightness_notification_cmd'
bindsym XF86MonBrightnessUp exec \
'STEP="$brightness_step" && light -A ${STEP:-5} && $brightness_notification_cmd'