{ 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" "N, exec, signal-desktop" "T, exec, zeditor" "B, exec, floorp" "X, exec, freetube" "V, exec, vesktop" "M, exec, element-desktop" "D, exec, ghostty" "P, exec, bitwarden" # Workspaces "1, workspace, 1" "2, workspace, 2" "3, workspace, 3" "4, workspace, 4" "5, workspace, 5" # Windows "Tab, killactive" "Backspace, layoutmsg, togglesplit" # Window Focus "C, movefocus, l" "A, movefocus, u" "E, movefocus, d" "I, movefocus, r" "Left, movefocus, l" "Up, movefocus, u" "Down, movefocus, d" "Right, movefocus, r" "F, splitratio, -0.33" "O, splitratio, 0.33" "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 ]; superShiftBinds = builtins.map (x: "SUPER SHIFT, " + x) [ # Super+shift binds "S, exec, flameshot gui" "period, exec, emote" "T, fullscreen, 0" # "Print, exec, grim -g \"$(slurp)\"" "End, exec, shutdown now" "Insert, exec, systemctl reboot" "Home, exec, swaylock" ]; superCtrlBinds = builtins.map (x: "SUPER CTRL, " + x) [ # Super+shift binds ]; altBinds = builtins.map (x: "CTRL ALT, " + x) [ # Alt binds # "Tab, togglefloating" # Window "1, movetoworkspacesilent, 1" "2, movetoworkspacesilent, 2" "3, movetoworkspacesilent, 3" "4, movetoworkspacesilent, 4" "5, movetoworkspacesilent, 5" "C, movewindow, l" "A, movewindow, u" "E, movewindow, d" "I, movewindow, r" "Left, movewindow, l" "Up, movewindow, u" "Down, movewindow, d" "Right, movewindow, r" ]; 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 "Tab, togglefloating" "1, movetoworkspacesilent, 1" "2, movetoworkspacesilent, 2" "3, movetoworkspacesilent, 3" "4, movetoworkspacesilent, 4" "5, movetoworkspacesilent, 5" ]; 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/