From 8b90c71737a2b1a6eb6f6efa766089ec4b79c8f3 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Thu, 29 Feb 2024 11:49:36 +0100 Subject: [PATCH] Set up swayosd --- home/features/wayland/global.nix | 9 ++------- home/features/wayland/hyprland/hyprland.conf | 8 ++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/home/features/wayland/global.nix b/home/features/wayland/global.nix index 89c363f..d681322 100644 --- a/home/features/wayland/global.nix +++ b/home/features/wayland/global.nix @@ -9,13 +9,8 @@ ../desktop ]; - # TODO: set up - # - volume/backlight controls - # - look into swaylock or whatever people use - - home.sessionVariables = { - NIXOS_OZONES_WL = "1"; - }; + home.sessionVariables.NIXOS_OZONES_WL = "1"; + services.swayosd.enable = true; home.packages = let diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index 4e43311..d4d84ff 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -162,4 +162,12 @@ bind=,escape,submap,reset submap=reset # }}} +# {{{ Volume & brightness +binde=, XF86AudioRaiseVolume, exec, swayosd --output-volume raise +binde=, XF86AudioLowerVolume, exec, swayosd --output-volume lower +binde=, XF86AudioMute, exec, swayosd --output-volume mute-toggle +binde=, XF86AudioMicMute, exec, swayosd --input-volume mute-toggle +binde=, XF86MonBrightnessUp, exec, swayosd --brightness raise +binde=, XF86MonBrightnessDown, exec, swayosd --brightness lower +# }}} # }}}