{ 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" "H, exec, feishin" "G, exec, scrcpy" "R, exec, thunar" "S, exec, steam" "E, exec, ghostty -e y" "N, exec, signal-desktop" "T, exec, zeditor" "B, exec, floorp" "Y, exec, freetube" "V, exec, vesktop" "M, exec, element-desktop" "D, exec, ghostty" "W, exec, bitwarden" # Workspaces "1, workspace, 1" "2, workspace, 2" "3, workspace, 3" "4, workspace, 4" "5, workspace, 5" # Windows "Tab, killactive" "F, togglefloating" "Backspace, layoutmsg, togglesplit" # Window Focus "Left, movefocus, l" "Up, movefocus, u" "Down, movefocus, d" "Right, movefocus, r" "bracketleft, splitratio, -0.33" "bracketright, splitratio, 0.33" # Audio "Page_Up, exec, playerctl next" "Page_Down, exec, playerctl previous" "Home, exec, playerctl play-pause" "Space, exec, fuzzel" # Utility "End, exec, shutdown now" "Insert, exec, systemctl reboot" "Home, exec, swaylock" ]; superShiftBinds = builtins.map (x: "SUPER SHIFT, " + x) [ # Super+shift binds "S, exec, flameshot gui" "period, exec, emote" "Tab, fullscreen, 0" # "Print, exec, grim -g \"$(slurp)\"" ]; superCtrlBinds = builtins.map (x: "SUPER CTRL, " + x) [ # Super+shift binds ]; altBinds = builtins.map (x: "CTRL ALT, " + x) [ # Alt binds ]; shiftBinds = builtins.map (x: "SHIFT, " + x) [ # Shift binds ]; ctrlBinds = builtins.map (x: "CTRL, " + x) [ # Ctrl binds ]; ctrlShiftBinds = builtins.map (x: "CTRL SHIFT, " + x) [ # Ctrl+shift binds # Window "1, movetoworkspacesilent, 1" "2, movetoworkspacesilent, 2" "3, movetoworkspacesilent, 3" "4, movetoworkspacesilent, 4" "5, movetoworkspacesilent, 5" # Window Move "Left, movewindow, l" "Up, movewindow, u" "Down, movewindow, d" "Right, movewindow, r" ]; 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 ++ superCtrlBinds ++ altBinds ++ ctrlBinds ++ ctrlShiftBinds ++ shiftBinds ++ functionBinds # Docs # https://wiki.hyprland.org/Getting-Started/Master-Tutorial/