device-nokia-n900: i3wm: use volume keys for audio and display brightness (MR 5012)

Volume keys adjust alsa volume, and Shift + volume keys adjusts display
brightness.

This is a variation of [1] and [2] from from postmarketOS/pmaports!4133.

[1] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=a060096b4abe8b614e9ae11aff29f133aa4486b9
[2] https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4133/diffs?commit_id=968293603a3d55d1380fdff34d4c89d8bcd00bda

Co-Authored-By: DvaMishkiLapa <thesame.personal@gmail.com>
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Sicelo A. Mhlongo 2024-04-06 19:15:18 +02:00 committed by Stefan Hansson
parent 646e0b50df
commit a61c3a3e48
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
2 changed files with 10 additions and 3 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Sicelo <absicsz@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-nokia-n900
pkgver=19
pkgver=20
pkgrel=0
pkgdesc="Nokia N900"
url="https://postmarketos.org"
@ -149,7 +149,7 @@ xkeyboard_config() {
i3wm() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-i3wm"
depends="unclutter-xfixes i3blocks rxvt-unicode upower"
depends="unclutter-xfixes i3blocks rxvt-unicode upower brightnessctl"
install -D -m644 "$srcdir"/i3wm.conf \
"$subpkgdir"/etc/skel/.config/i3/config
install -D -m644 "$srcdir"/i3blocks.conf \
@ -196,7 +196,7 @@ e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b11
2463008d270ed09342f15b51f24ea455bd884021f95397991b85616b6840a6608d91cd1fc43186094f5c3d1bd25e88c16aa9ead07b018aea3d93cd2359bba0b1 deviceinfo
f48b8dd7297d03008f73e1ecd55b77ace535ecb03f9bdf021123b96fb5f4fb491ff4c532e226b835c8118fa8d505cc4c635a2b604a3e42a162746021552a551c modules-initfs
826a3790b49324c1e61c75b6c0ffc043a2a1d7c13a8c554fb5eae4977af47a1ca93d70ef8c783d712b953b70e18ae58fa4c6a49bf97263398a01a0c4f91ebc8f i3blocks.conf
035c2536a6be717efe8467df9c90d52c27d24e5ddc70c0fbaef1f4c82e295bcd75ea5388c1b9868b2497b76bfe4dcfb45aa5e15e9650a7b50226c2e21f6f7c0d i3wm.conf
506accabcf9fb3e2a270228ea53fdcb57f51092d6e7126a631af8eed697cd882cc805b19cf255422284bec12c928b58219d173a4a790d784db5335a059b6bb4f i3wm.conf
0b80af9fd1f36e6bc06bdfdf48352897234ac7457210649016665da8570a5a64b8a0841b4fbeb64fd7054a5246a64718cf4412f8a53024ce39b28a80984972d8 protip_shell.sh
6c6a70667f37807089adbb343c09d1f62d47b8e6c9c0a54f44790b822f8bff3dccae73341ef736b799fd6740bbd6e1f48e6e122c2e08520f71f6ad7434a47d2c battery-bq27200
d9ef88c714e9fce8822f63b7a9d7fc3e1ed472c8c876b44ba524d44efea322839f13ddd2fa652420608427ecf7279bfaac302c9b67667f32796ca21da332164d calendar

View file

@ -67,6 +67,13 @@ bindsym XF86PowerOff exec --no-startup-id i3-nagbar \
-B 'Suspend' 'loginctl suspend' \
-B 'Shutdown' 'loginctl poweroff'
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set PCM 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set PCM 5%-
# Adjust display brightness using Shift + Volume buttons in 10% steps
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id brightnessctl --quiet --class=backlight set +10%
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id brightnessctl --quiet --class=backlight set 10%-
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {