NixOS-Config/modules/home/wms/hyprland/hotkeys/default.nix

165 lines
6.7 KiB
Nix
Raw Normal View History

2024-12-08 06:41:06 -05:00
{ pkgs, config, ... }:
{
wayland.windowManager.hyprland.settings = let
# Set default modifier and variables
primeMod = "Super";
secMod = "Alt";
resizeAmount = "55";
in {
bind = [
## Launchers
# Browser
''${primeMod}, F1, exec, librewolf -p Main --name MainBrowser | notify-send "Main Browser"''
''${primeMod}, F2, exec, librewolf -p Alt --name AltBrowser | notify-send "Alternate Browser"''
''${primeMod}, F3, exec, librewolf -p Misc --name MiscBrowser | notify-send "Miscellaneous Browser"''
# Virtual machines
''${primeMod}, F4, exec, virt-manager | notify-send "Virtual Machines"''
''${primeMod}, F5, exec, looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"''
# Prime + key
"${primeMod}, s, exec, rofi -show run -p Command"
"${primeMod}, c, exec, clipman pick -t rofi"
"${primeMod}, x, exec, rofipower"
2024-12-08 06:41:06 -05:00
"${primeMod}, b, exec, pkill -USR1 waybar"
"${primeMod}, Return, exec, foot"
# Prime + shift + key
"${primeMod} Shift, s, exec, rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history"
"${primeMod} Shift, t, exec, pcmanfm"
"${primeMod} Shift, e, exec, bemoji -n -P 0"
"${primeMod} Shift, b, exec, rofi-bluetooth"
"${primeMod} Shift, Return, exec, foot ranger"
# Prime + ctrl + key
"${primeMod} Ctrl, s, exec, rofiscratch"
2024-12-08 06:41:06 -05:00
''${primeMod} Ctrl, c, exec, wlpicker && notify-send "Color copied to clipboard"''
## Media
# Volume
"${secMod}, j, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
"${secMod}, k, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
# MPD
"${primeMod}, Backslash, exec, mpc toggle"
"${secMod} Shift, h, exec, mpc prev"
"${secMod} Shift, j, exec, mpc volume -3"
"${secMod} Shift, k, exec, mpc volume +3"
"${secMod} Shift, l, exec, mpc next"
## Miscellaneous
# Notifications
"${primeMod}, n, exec, makotoggle"
"${primeMod} Shift, n, exec, makoctl restore"
"${primeMod} Ctrl, n, exec, makoctl dismiss -a"
# Screenshots
''${secMod}, f, exec, XDG_SCREENSHOTS_DIR="$HOME/Pictures/Screenshots" SLURP_ARGS="-w 3 -c 3823C4 -B 00000066 -b 00000099" grimblast --freeze --notify copysave area''
"${secMod} Shift, f, exec, grimblast --notify copysave output"
"${secMod} Ctrl, f, exec, grimblast --notify copysave active"
# Screenshots
# Display and keyboard brightness
"${primeMod}, equal, exec, brightnessctl s +5%"
"${primeMod}, minus, exec, brightnessctl s 5%-"
"${primeMod} Shift, equal, exec, brightnessctl s +1%"
"${primeMod} Shift, minus, exec, brightnessctl s 1%-"
2024-12-08 06:41:06 -05:00
## Window manager
"${primeMod}, q, killactive,"
# Switch to workspaces
"${primeMod}, grave, workspace, name:0"
"${primeMod}, 1, workspace, name:${config.ws.w1}"
"${primeMod}, 2, workspace, name:${config.ws.w2}"
"${primeMod}, 3, workspace, name:${config.ws.w3}"
"${primeMod}, 4, workspace, name:${config.ws.w4}"
"${primeMod}, 5, workspace, name:${config.ws.w5}"
"${primeMod}, 6, workspace, name:${config.ws.w6}"
"${primeMod}, 7, workspace, name:${config.ws.w7}"
"${primeMod}, 8, workspace, name:${config.ws.w8}"
"${primeMod}, 9, workspace, name:${config.ws.w9}"
# Switch to alternate workspaces
"${secMod}, F1, workspace, name:${config.ws.w1a}"
"${secMod}, F2, workspace, name:${config.ws.w2a}"
"${secMod}, F3, workspace, name:${config.ws.w3a}"
"${secMod}, F4, workspace, name:${config.ws.w4a}"
"${secMod}, F5, workspace, name:${config.ws.w5a}"
"${secMod}, F6, workspace, name:${config.ws.w6a}"
"${secMod}, F7, workspace, name:${config.ws.w7a}"
"${secMod}, F8, workspace, name:${config.ws.w8a}"
"${secMod}, F9, workspace, name:${config.ws.w9a}"
# Move window to and focus workspace
"${primeMod} Shift, grave, movetoworkspace, name:${config.ws.w0}"
"${primeMod} Shift, 1, movetoworkspace, name:${config.ws.w1}"
"${primeMod} Shift, 2, movetoworkspace, name:${config.ws.w2}"
"${primeMod} Shift, 3, movetoworkspace, name:${config.ws.w3}"
"${primeMod} Shift, 4, movetoworkspace, name:${config.ws.w4}"
"${primeMod} Shift, 5, movetoworkspace, name:${config.ws.w5}"
"${primeMod} Shift, 6, movetoworkspace, name:${config.ws.w6}"
"${primeMod} Shift, 7, movetoworkspace, name:${config.ws.w7}"
"${primeMod} Shift, 8, movetoworkspace, name:${config.ws.w8}"
"${primeMod} Shift, 9, movetoworkspace, name:${config.ws.w9}"
# Move window to and focus alternate workspace
"${secMod} Shift, F1, movetoworkspace, name:${config.ws.w1a}"
"${secMod} Shift, F2, movetoworkspace, name:${config.ws.w2a}"
"${secMod} Shift, F3, movetoworkspace, name:${config.ws.w3a}"
"${secMod} Shift, F4, movetoworkspace, name:${config.ws.w4a}"
"${secMod} Shift, F5, movetoworkspace, name:${config.ws.w5a}"
"${secMod} Shift, F6, movetoworkspace, name:${config.ws.w6a}"
"${secMod} Shift, F7, movetoworkspace, name:${config.ws.w7a}"
"${secMod} Shift, F8, movetoworkspace, name:${config.ws.w8a}"
"${secMod} Shift, F9, movetoworkspace, name:${config.ws.w9a}"
# Change focused window
"${primeMod}, h, hy3:movefocus, l"
"${primeMod}, j, hy3:movefocus, d"
"${primeMod}, k, hy3:movefocus, u"
"${primeMod}, l, hy3:movefocus, r"
# Move focused window
"${primeMod} Shift, h, hy3:movewindow, l"
"${primeMod} Shift, j, hy3:movewindow, d"
"${primeMod} Shift, k, hy3:movewindow, u"
"${primeMod} Shift, l, hy3:movewindow, r"
# Resize window
"${primeMod} ${secMod}, h, resizeactive, -${resizeAmount} 0"
"${primeMod} ${secMod}, j, resizeactive, 0 -${resizeAmount}"
"${primeMod} ${secMod}, k, resizeactive, 0 ${resizeAmount}"
"${primeMod} ${secMod}, l, resizeactive, ${resizeAmount} 0"
# Floating
"${primeMod}, Space, hy3:togglefocuslayer"
"${primeMod} Shift, Space, togglefloating"
# Change layout
"${primeMod}, f, fullscreen"
"${primeMod}, w, hy3:changegroup, opposite"
"${primeMod}, v, hy3:makegroup, v"
"${primeMod}, e, hy3:changegroup, toggletab"
## Scratchpads
"${primeMod} Shift, Backslash, togglespecialworkspace, btop"
"${primeMod} Shift, m, togglespecialworkspace, music"
"${primeMod} Shift, v, togglespecialworkspace, sound"
];
# Mouse
bindm = [
"${primeMod}, mouse:272, movewindow"
"${primeMod}, mouse:273, resizewindow"
];
bindn = [
",mouse:272, hy3:focustab, mouse"
];
};
}