aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-11-09 17:04:17 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-11-09 17:04:17 +0000
commit3bc9805389e034105cff77db163759d64356ea40 (patch)
tree69516b6d53b5d0d8a376c00b7c098cf4e2ef04f3
parent75131895c412fe019489b84083bb0dabc312eed7 (diff)
Switched from using pactl to the FreeBSD mixer in my volume control script and changed brightnessctl to backlight for media keys.
-rwxr-xr-x.config/river/init15
1 files changed, 6 insertions, 9 deletions
diff --git a/.config/river/init b/.config/river/init
index a63244d..1d048c0 100755
--- a/.config/river/init
+++ b/.config/river/init
@@ -177,12 +177,9 @@ riverctl map passthrough Super F11 enter-mode normal
for mode in normal locked
do
# Control volume
- #riverctl map $mode None XF86AudioRaiseVolume spawn 'amixer sset Master 2%+'
- riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +2%'
- #riverctl map $mode None XF86AudioLowerVolume spawn 'amixer sset Master 2%-'
- riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -2%'
- #riverctl map $mode None XF86AudioMute spawn 'amixer set Master 1+ toggle'
- riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
+ riverctl map $mode None XF86AudioRaiseVolume spawn 'mixer vol.volume=+2%'
+ riverctl map $mode None XF86AudioLowerVolume spawn 'mixer vol.volume=-2%'
+ riverctl map $mode None XF86AudioMute spawn 'mixer vol.mute=toggle'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
# riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
@@ -190,9 +187,9 @@ do
# riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
# riverctl map $mode None XF86AudioNext spawn 'playerctl next'
- # Control screen backlight brightness with light (https://github.com/haikarainen/light)
- riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl -s > ~/.cache/brightness s +5'
- riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl -s > ~/.cache/brightness s 5-'
+ # Control screen backlight brightness with backlight
+ riverctl map $mode None XF86MonBrightnessUp spawn 'backlight + 4'
+ riverctl map $mode None XF86MonBrightnessDown spawn 'backlight - 4'
done
# auto starting apps