From 75d0e9195820818a612e50676820970631243d8d Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sun, 19 Jul 2026 14:06:35 -0400 Subject: [PATCH] chore: add bluetooth --- .../evanreichard@lin-va-mba-personal/default.nix | 1 + .../programs/graphical/wms/hyprland/config/hyprland.lua | 9 ++++++--- modules/home/programs/graphical/wms/hyprland/default.nix | 6 ++++-- systems/x86_64-linux/lin-va-mba-personal/default.nix | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/homes/x86_64-linux/evanreichard@lin-va-mba-personal/default.nix b/homes/x86_64-linux/evanreichard@lin-va-mba-personal/default.nix index 035f609..dda401b 100755 --- a/homes/x86_64-linux/evanreichard@lin-va-mba-personal/default.nix +++ b/homes/x86_64-linux/evanreichard@lin-va-mba-personal/default.nix @@ -33,6 +33,7 @@ in wms.hyprland = { enable = true; mainMod = "ALT"; + bluetooth = true; }; kitty = enabled; strawberry = enabled; diff --git a/modules/home/programs/graphical/wms/hyprland/config/hyprland.lua b/modules/home/programs/graphical/wms/hyprland/config/hyprland.lua index d1bec76..2acc8ab 100644 --- a/modules/home/programs/graphical/wms/hyprland/config/hyprland.lua +++ b/modules/home/programs/graphical/wms/hyprland/config/hyprland.lua @@ -12,6 +12,7 @@ hl.on("hyprland.start", function() hl.exec_cmd("uwsm app -- waybar") if terminal then hl.exec_cmd("uwsm app -- " .. terminal) end hl.exec_cmd("uwsm app -- firefox") + if btApplet then hl.exec_cmd("uwsm app -- blueman-applet") end end) ----------------------- @@ -182,9 +183,11 @@ hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_ hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 4%+"), { locked = true, repeating = true }) hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 5%-"), { locked = true, repeating = true }) --- macOS Keyboard Brightness -hl.bind(menuMod .. " + XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -d kbd_backlight s 10%+"), { locked = true, repeating = true }) -hl.bind(menuMod .. " + XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -d kbd_backlight s 10%-"), { locked = true, repeating = true }) +-- macOS Keyboard Brightness - Dedicated F5/F6 keys emit XF86KbdBrightness*; applesmc LED is 'smc::kbd_backlight'. +hl.bind("XF86KbdBrightnessUp", hl.dsp.exec_cmd("brightnessctl -d smc::kbd_backlight s 10%+"), { locked = true, repeating = true }) +hl.bind("XF86KbdBrightnessDown", hl.dsp.exec_cmd("brightnessctl -d smc::kbd_backlight s 10%-"), { locked = true, repeating = true }) +hl.bind(menuMod .. " + XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -d smc::kbd_backlight s 10%+"), { locked = true, repeating = true }) +hl.bind(menuMod .. " + XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -d smc::kbd_backlight s 10%-"), { locked = true, repeating = true }) -- Player Controls hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) diff --git a/modules/home/programs/graphical/wms/hyprland/default.nix b/modules/home/programs/graphical/wms/hyprland/default.nix index 2454db5..c2b9e94 100755 --- a/modules/home/programs/graphical/wms/hyprland/default.nix +++ b/modules/home/programs/graphical/wms/hyprland/default.nix @@ -7,7 +7,7 @@ }: let inherit (lib) types mkIf; - inherit (lib.${namespace}) mkOpt enabled; + inherit (lib.${namespace}) mkOpt mkBoolOpt enabled; cfg = config.${namespace}.programs.graphical.wms.hyprland; graphical = config.${namespace}.programs.graphical; @@ -22,6 +22,7 @@ in mainMod = mkOpt types.str "SUPER" "main modifier key"; menuMod = mkOpt types.str "SUPER" "menu modifier key (i.e. menuMod + space)"; monitors = mkOpt (with types; listOf str) [ ", preferred, auto, 1" ] "monitor configuration"; + bluetooth = mkBoolOpt false "Bluetooth tray applet (blueman); requires system services.blueman.enable"; }; config = mkIf cfg.enable { @@ -47,6 +48,7 @@ in local mainMod = "${cfg.mainMod}" local menuMod = "${cfg.menuMod}" local terminal = ${if terminal == null then "nil" else ''"${terminal}"''} + local btApplet = ${if cfg.bluetooth then "true" else "false"} ${lib.concatMapStringsSep "\n" mkMonitor cfg.monitors} '' @@ -218,7 +220,7 @@ in hyprshot wofi wofi-emoji - ]; + ] ++ lib.optional cfg.bluetooth blueman; xdg.configFile = { "wofi/config".source = ./config/wofi.conf; diff --git a/systems/x86_64-linux/lin-va-mba-personal/default.nix b/systems/x86_64-linux/lin-va-mba-personal/default.nix index f8c4c04..66e3805 100755 --- a/systems/x86_64-linux/lin-va-mba-personal/default.nix +++ b/systems/x86_64-linux/lin-va-mba-personal/default.nix @@ -23,6 +23,8 @@ in services = { xserver.videoDrivers = [ "modesetting" ]; fwupd.enable = true; + # Blueman Mechanism - Polkit helper the waybar tray applet needs for privileged BT ops. + blueman.enable = true; }; # System Config