main
Inga 🏳‍🌈 3 months ago
parent 94ad8baed2
commit 3275f72f6d
  1. 19
      README.md
  2. 6
      dotfiles/.config/river/init

@ -324,21 +324,18 @@ Otherwise, alpine wiki describes how to configure WiFi using `iwd`.
### Backlight
**TODO 2024**
```
doas apk add light
doas micro /etc/udev/rules.d/backlight.rules
```
add the following lines into backlight.rules to make it possible for all users in video group (not just superusers) to control backlight:
```
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
doas apk add enlighten
doas rc-service udev restart
```
and then
and add the following lines to river config:
```
doas rc-service udev restart
riverctl map $mode None XF86MonBrightnessUp spawn "BACKLIGHT_DEVICE=amdgpu_bl1 enlighten +5%"
riverctl map $mode None XF86MonBrightnessDown spawn "BACKLIGHT_DEVICE=amdgpu_bl1 enlighten -5%"
```
Backlight control with Fn+F5/F6 should work now.
(`amdgpu_bl0` is specific for this laptop; value for others can be obtained from `/sys/class/backlight/`)

@ -141,9 +141,9 @@ do
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brighness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn "light -A 5 && light -G | cut -d'.' -f1 > $XDG_RUNTIME_DIR/wobpipebright"
riverctl map $mode None XF86MonBrightnessDown spawn "light -U 5 && light -G | cut -d'.' -f1 > $XDG_RUNTIME_DIR/wobpipebright"
# Control screen backlight brighness with enlighten (https://github.com/HalosGhost/enlighten)
riverctl map $mode None XF86MonBrightnessUp spawn "BACKLIGHT_DEVICE=amdgpu_bl1 enlighten +5%"
riverctl map $mode None XF86MonBrightnessDown spawn "BACKLIGHT_DEVICE=amdgpu_bl1 enlighten -5%"
done
# Set background and border color

Loading…
Cancel
Save