From 5ca48231287d67e75a3f21dbdbc47d6dc65752c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darth=20=C5=A0=C4=8C!?= Date: Sat, 7 Sep 2024 17:14:23 +0200 Subject: [PATCH] config: Added default button mapping for xf86 keys (#7672) * Added default button mapping for laptop multimedia keys for volume and brightness * Added default button mapping for laptop multimedia keys for volume and brightness into example config --- example/hyprland.conf | 8 ++++++++ src/config/defaultConfig.hpp | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/example/hyprland.conf b/example/hyprland.conf index d55d25fd..76e5bcdb 100644 --- a/example/hyprland.conf +++ b/example/hyprland.conf @@ -228,6 +228,14 @@ bind = $mainMod, mouse_up, workspace, e-1 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- + ############################## ### WINDOWS AND WORKSPACES ### diff --git a/src/config/defaultConfig.hpp b/src/config/defaultConfig.hpp index 59265fee..b8d215d1 100644 --- a/src/config/defaultConfig.hpp +++ b/src/config/defaultConfig.hpp @@ -241,6 +241,13 @@ bind = $mainMod, mouse_up, workspace, e-1 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- ############################## ### WINDOWS AND WORKSPACES ###