diff --git a/modules/home/gui/desktop/hypr/land/config/bind.nix b/modules/home/gui/desktop/hypr/land/config/bind.nix index a6b5eaa..9fdd505 100755 --- a/modules/home/gui/desktop/hypr/land/config/bind.nix +++ b/modules/home/gui/desktop/hypr/land/config/bind.nix @@ -1,4 +1,21 @@ +{ flake, osConfig, ... }: + let + inherit (flake.config.machines) devices; + + mars = devices.mars.name; + deimos = devices.deimos.name; + host = osConfig.networking.hostName; + + deviceLogic = + d: m: + if host == deimos then + "${d}" + else if host == mars then + "${m}" + else + ""; + superBinds = builtins.map (x: "SUPER, " + x) [ # Apps "Z, exec, obsidian" @@ -31,8 +48,8 @@ let "F, splitratio, 0.33" "O, splitratio, -0.33" # Audio - "PageUp, exec, playerctl next" - "PageDown, exec, playerctl previous" + "Page_Up, exec, playerctl next" + "Page_Down, exec, playerctl previous" "Home, exec, playerctl play-pause" "Space, exec, fuzzel" ]; @@ -85,6 +102,14 @@ let # Ctrl+shift binds # "End, exec, shutdown now" ]; + + functionBinds = builtins.map (x: " , " + x) [ + "XF86MonBrightnessUp, exec, brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s +10%" + "XF86MonBrightnessDown, exec, brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s 10%-" + "XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%" + "XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%" + "XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" + ]; in superBinds ++ superShiftBinds @@ -93,5 +118,6 @@ superBinds ++ ctrlBinds ++ ctrlShiftBinds ++ shiftBinds +++ functionBinds # Docs # https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ diff --git a/modules/home/gui/desktop/hypr/land/default.nix b/modules/home/gui/desktop/hypr/land/default.nix index 8af489c..879c095 100755 --- a/modules/home/gui/desktop/hypr/land/default.nix +++ b/modules/home/gui/desktop/hypr/land/default.nix @@ -1,13 +1,14 @@ { flake, config, + osConfig, ... }: let configPath = ./config; configImports = { animations = import (configPath + /animations.nix); - bind = import (configPath + /bind.nix); + bind = import (configPath + /bind.nix) { inherit flake osConfig; }; bindm = import (configPath + /bindm.nix); binds = import (configPath + /binds.nix); # bindl = import (configPath + /bindl.nix);