sway: switch to brightnessctl
`light` upstream repo is archived, so we have to switch to a maintained alternative.
This commit is contained in:
parent
86f0264757
commit
2b854c5085
2 changed files with 6 additions and 6 deletions
|
|
@ -41,9 +41,9 @@ Recommends: rofi-wayland
|
|||
Recommends: xdg-user-dirs
|
||||
Requires: /usr/bin/pgrep
|
||||
Requires: /usr/bin/pkill
|
||||
Requires: brightnessctl >= 0.5.1-11
|
||||
Requires: desktop-backgrounds-compat
|
||||
Requires: grimshot
|
||||
Requires: light
|
||||
Requires: lxqt-policykit
|
||||
Requires: playerctl
|
||||
Requires: pulseaudio-utils
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
# Key bindings for brightness control using `light`.
|
||||
# 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: light
|
||||
# Requires: brightnessctl >= 0.5.1-11
|
||||
# Recommends: libnotify
|
||||
|
||||
set $brightness_notification_cmd command -v notify-send >/dev/null && \
|
||||
VALUE=$(light) && VALUE=${VALUE%%.*} && \
|
||||
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" && light -U ${STEP:-5} && $brightness_notification_cmd'
|
||||
'STEP="$brightness_step" && brightnessctl -q set ${STEP:-5}%- && $brightness_notification_cmd'
|
||||
bindsym XF86MonBrightnessUp exec \
|
||||
'STEP="$brightness_step" && light -A ${STEP:-5} && $brightness_notification_cmd'
|
||||
'STEP="$brightness_step" && brightnessctl -q set +${STEP:-5}% && $brightness_notification_cmd'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue