refactor: splitted sway config
This commit is contained in:
18
.config/sway/config.d/60-bindings-brightness.conf
Normal file
18
.config/sway/config.d/60-bindings-brightness.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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'
|
||||
Reference in New Issue
Block a user