diff --git a/bin/brightness b/bin/brightness new file mode 100755 index 0000000..17c562c --- /dev/null +++ b/bin/brightness @@ -0,0 +1,14 @@ +#!/bin/bash +DEVICE=sysfs/backlight/intel_backlight + +case $1 in + d*) + light -s $DEVICE -U 10 + ;; + i*) + light -s $DEVICE -A 10 + ;; + *) + echo "ERROR: invalid command: \"$1\"" + ;; +esac diff --git a/config b/config index 836bfb9..848eec1 100644 --- a/config +++ b/config @@ -17,6 +17,7 @@ set $right l set $term termite set $background $HOME/Cloud/xkonni/Pictures/wallpaper/5k_bavarian_forest_bw.jpg set $lock_cmd $HOME/.config/sway/bin/lock +set $brightness_cmd "$HOME/.config/sway/bin/brightness set $volume_cmd "$HOME/.config/sway/bin/volume set $font "Cascadia Code PL Regular 10" @@ -156,6 +157,8 @@ bindsym $mod+a focus parent bindsym XF86AudioRaiseVolume exec $volume_cmd increase bindsym XF86AudioLowerVolume exec $volume_cmd decrease bindsym XF86AudioMute exec $volume_cmd mute +bindsym XF86MonBrightnessUp exec $brightness_cmd increase +bindsym XF86MonBrightnessDown exec $brightness_cmd decrease # ## Screenshot #