chore: add bluetooth
This commit is contained in:
@@ -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 })
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user