forked from Shinonome/dots-hyprland
190 lines
12 KiB
Nix
190 lines
12 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
wayland.windowManager.hyprland.settings = {
|
|
# Shell keybinds
|
|
bindi = [
|
|
"Super, Super_L, Toggle overview, global, quickshell:overviewToggleRelease"
|
|
];
|
|
binditn = [
|
|
"Super, catchall, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Ctrl, Super_L, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:272, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:273, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:274, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:275, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:276, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse:277, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse_up, global, quickshell:overviewToggleReleaseInterrupt"
|
|
"Super, mouse_down, global, quickshell:overviewToggleReleaseInterrupt"
|
|
];
|
|
bindit = [
|
|
", Super_L, global, quickshell:workspaceNumber"
|
|
];
|
|
bindd = [
|
|
# The Nix module for Hyprland doesn't use `bindd` as a separate type,
|
|
# but it's used in the config file to handle cheatsheet descriptions.
|
|
# We'll put these into the main `bind` list and resolve the duplicates.
|
|
# The `bindd` lines here were already duplicates of the `bind` lines
|
|
# in your previous example, so they were the source of the conflict.
|
|
# I am merging them into a single, comprehensive `bind` list below.
|
|
];
|
|
|
|
# All unique keybindings are listed here.
|
|
bind =
|
|
[
|
|
# Shell and QuickShell keybinds
|
|
"Super, V, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy"
|
|
"Super, Period, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || ~/.config/hypr/hyprland/scripts/fuzzel-emoji.sh copy"
|
|
"Super, Tab, global, quickshell:overviewToggle"
|
|
"Super, A, global, quickshell:sidebarLeftToggle"
|
|
"Super+Alt, A, global, quickshell:sidebarLeftToggleDetach"
|
|
"Super, B, global, quickshell:sidebarLeftToggle"
|
|
"Super, O, global, quickshell:sidebarLeftToggle"
|
|
"Super, N, global, quickshell:sidebarRightToggle"
|
|
"Super, Slash, global, quickshell:ch+CtrleatsheetToggle"
|
|
"Super, M, global, quickshell:mediaControlsToggle"
|
|
"Ctrl+Alt, Delete, global, quickshell:sessionToggle"
|
|
"Ctrl+Alt, Delete, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill wlogout || wlogout -p layer-shell"
|
|
"Shift+Super+Alt, Slash, exec, qs -p ~/.config/quickshell/$qsConfig/welcome.qml"
|
|
|
|
# Utilities keybinds
|
|
"Super+Shift, S, exec, qs -p ~/.config/quickshell/$qsConfig/screenshot.qml || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent"
|
|
"Super+Shift, T, exec, grim -g \"$(slurp $SLURP_ARGS)\" \"tmp.png\" && tesseract \"tmp.png\" - | wl-copy && rm \"tmp.png\""
|
|
"Super+Shift, C, exec, hyprpicker -a"
|
|
"Super+Alt, R, exec, ~/.config/hypr/hyprland/scripts/record.sh"
|
|
"Ctrl+Alt, R, exec, ~/.config/hypr/hyprland/scripts/record.sh --fullscreen"
|
|
"Super+Shift+Alt, R, exec, ~/.config/hypr/hyprland/scripts/record.sh --fullscreen-sound"
|
|
"Super+Shift+Alt, mouse:273, exec, ~/.config/hypr/hyprland/scripts/ai/primary-buffer-query.sh"
|
|
"Ctrl+Super, T, exec, ~/.config/hypr/hyprland/scripts/colors/switchwall.sh"
|
|
"Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool qs quickshell; qs -c $qsConfig &"
|
|
"Ctrl+Super, Backslash, resizeactive, exact 640 480"
|
|
"Super+Alt, f11, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i \"nipple\" | grep -v -i \"pussy\" | shuf -n 1); ACTION=$(notify-send \"Test notification with body image\" \"This notification should contain your user account <b>image</b> and <a href=\\\"https://discord.com/app\\\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\\\"$RANDOM_IMAGE\\\" alt=\\\"Testing image\\\"/>\" -a \"Hyprland keybind\" -p -h \"string:image-path:/var/lib/AccountsService/icons/$USER\" -t 6000 -i \"discord\" -A \"openImage=Open profile image\" -A \"action2=Open the random image\" -A \"action3=Useless button\"); [[ $ACTION == *openImage ]] && xdg-open \"/var/lib/AccountsService/icons/$USER\"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"'"
|
|
"Super+Alt, f12, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i \"nipple\" | grep -v -i \"pussy\" | shuf -n 1); ACTION=$(notify-send \"Test notification\" \"This notification should contain a random image in your <b>Pictures</b> folder and <a href=\\\"https://discord.com/app\\\">Discord</a> <b>icon</b>.\\n<i>Flick right to dismiss!</i>\" -a \"Discord (fake)\" -p -h \"string:image-path:$RANDOM_IMAGE\" -t 6000 -i \"discord\" -A \"openImage=Open profile image\" -A \"action2=Useless button\" -A \"action3=Cry more\"); [[ $ACTION == *openImage ]] && xdg-open \"/var/lib/AccountsService/icons/$USER\"'"
|
|
"Super+Alt, Equal, exec, notify-send \"Urgent notification\" \"Ah hell no\" -u critical -a 'Hyprland keybind'"
|
|
|
|
# Window management
|
|
"Super, Q, killactive"
|
|
"Super+Shift+Alt, Q, exec, hyprctl kill"
|
|
"Super+Alt, Space, togglefloating"
|
|
"Super, D, fullscreen, 1"
|
|
"Super, F, fullscreen, 0"
|
|
"Super+Alt, F, fullscreenstate, 0 3"
|
|
"Super, P, pin"
|
|
"Super, S, togglespecialworkspace"
|
|
"Super+Alt, S, movetoworkspacesilent, special"
|
|
"Alt, Tab, cyclenext"
|
|
"Alt, Tab, bringactivetotop"
|
|
"Super, mouse:275, togglespecialworkspace"
|
|
|
|
# Media
|
|
"Super+Shift, N, exec, playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
|
"Super+Shift, B, exec, playerctl previous"
|
|
"Super+Shift, P, exec, playerctl play-pause"
|
|
"Super+Shift+Alt, mouse:275, exec, playerctl previous"
|
|
"Super+Shift+Alt, mouse:276, exec, playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
|
|
|
# Session
|
|
"Ctrl+Shift+Alt+Super, Delete, exec, systemctl poweroff || loginctl poweroff"
|
|
|
|
# Apps
|
|
"Super, Return, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"$TERMINAL\" \"kitty -1\" \"foot\" \"alacritty\" \"wezterm\" \"konsole\" \"kgx\" \"uxterm\" \"xterm\""
|
|
"Super, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"$TERMINAL\" \"kitty -1\" \"foot\" \"alacritty\" \"wezterm\" \"konsole\" \"kgx\" \"uxterm\" \"xterm\""
|
|
"Ctrl+Alt, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"$TERMINAL\" \"kitty -1\" \"foot\" \"alacritty\" \"wezterm\" \"konsole\" \"kgx\" \"uxterm\" \"xterm\""
|
|
"Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"dolphin\" \"nautilus\" \"nemo\" \"thunar\" \"$TERMINAL\" \"kitty -1 fish -c yazi\""
|
|
"Super, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"google-chrome-stable\" \"zen-browser\" \"firefox\" \"brave\" \"chromium\" \"microsoft-edge-stable\" \"opera\" \"librewolf\""
|
|
"Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"code\" \"codium\" \"cursor\" \"zed\" \"zedit\" \"zeditor\" \"kate\" \"gnome-text-editor\" \"emacs\" \"command -v nvim && kitty -1 nvim\""
|
|
"Super+Shift, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"wps\" \"onlyoffice-desktopeditors\""
|
|
"Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"kate\" \"gnome-text-editor\" \"emacs\""
|
|
"Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"pavucontrol-qt\" \"pavucontrol\""
|
|
"Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"qs -p ~/.config/quickshell/$qsConfig/settings.qml\" \"systemsettings\" \"gnome-control-center\" \"better-control\""
|
|
"Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh \"gnome-system-monitor\" \"plasma-systemmonitor --page-name Processes\" \"command -v btop && kitty -1 fish -c btop\""
|
|
|
|
# Window movement and focus
|
|
"Super, Left, movefocus, l"
|
|
"Super, Right, movefocus, r"
|
|
"Super, Up, movefocus, u"
|
|
"Super, Down, movefocus, d"
|
|
"Super, BracketLeft, movefocus, l"
|
|
"Super, BracketRight, movefocus, r"
|
|
"Super+Shift, Left, movewindow, l"
|
|
"Super+Shift, Right, movewindow, r"
|
|
"Super+Shift, Up, movewindow, u"
|
|
"Super+Shift, Down, movewindow, d"
|
|
"Alt, F4, killactive"
|
|
"Super+Shift, mouse_down, movetoworkspace, r-1"
|
|
"Super+Shift, mouse_up, movetoworkspace, r+1"
|
|
"Super+Alt, mouse_down, movetoworkspace, -1"
|
|
"Super+Alt, mouse_up, movetoworkspace, +1"
|
|
"Super+Shift, Page_Down, movetoworkspace, r+1"
|
|
"Super+Shift, Page_Up, movetoworkspace, r-1"
|
|
"Ctrl+Super+Shift, Right, movetoworkspace, r+1"
|
|
"Ctrl+Super+Shift, Left, movetoworkspace, r-1"
|
|
"Ctrl+Super, Right, workspace, r+1"
|
|
"Ctrl+Super, Left, workspace, r-1"
|
|
"Ctrl+Super+Alt, Right, workspace, m+1"
|
|
"Ctrl+Super+Alt, Left, workspace, m-1"
|
|
"Super, Page_Down, workspace, +1"
|
|
"Super, Page_Up, workspace, -1"
|
|
"Ctrl+Super, Page_Down, workspace, r+1"
|
|
"Ctrl+Super, Page_Up, workspace, r-1"
|
|
"Super, mouse_up, workspace, +1"
|
|
"Super, mouse_down, workspace, -1"
|
|
"Ctrl+Super, mouse_up, workspace, r+1"
|
|
"Ctrl+Super, mouse_down, workspace, r-1"
|
|
|
|
"Super+Alt, 0, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 0"
|
|
"Super, 0, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 0"
|
|
]
|
|
++ (
|
|
builtins.concatLists (builtins.genList (
|
|
i: let
|
|
ws = i + 1;
|
|
in [
|
|
"Super+Alt, ${toString ws}, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent ${toString ws}"
|
|
"Super, ${toString ws}, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace ${toString ws}"
|
|
]
|
|
)
|
|
9)
|
|
);
|
|
|
|
# The `bindm` list is used for mouse modifiers.
|
|
bindm = [
|
|
"Super, mouse:272, movewindow"
|
|
"Super, mouse:274, movewindow"
|
|
"Super, mouse:273, resizewindow"
|
|
];
|
|
|
|
# The `bindl` list is for key release events.
|
|
bindl = [
|
|
", XF86MonBrightnessUp, exec, qs -c $qsConfig ipc call brightness increment || brightnessctl s 5%+"
|
|
", XF86MonBrightnessDown, exec, qs -c $qsConfig ipc call brightness decrement || brightnessctl s 5%-"
|
|
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+"
|
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle"
|
|
"Super+Shift, M, exec, wpctl set-mute @DEFAULT_SINK@ toggle"
|
|
"Alt, XF86AudioMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
|
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
|
"Super+Alt, M, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
|
", Print, exec, grim - | wl-copy"
|
|
"Ctrl, Print, exec, mkdir -p $(xdg-user-dir PICTURES)/Screenshots && grim $(xdg-user-dir PICTURES)/Screenshots/Screenshot_\"$(date '+%Y-%m-%d_%H.%M.%S')\".png"
|
|
", XF86AudioNext, exec, playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
|
", XF86AudioPrev, exec, playerctl previous"
|
|
", XF86AudioPlay, exec, playerctl play-pause"
|
|
", XF86AudioPause, exec, playerctl play-pause"
|
|
];
|
|
|
|
# The `binde` list is for continuous events.
|
|
binde = [
|
|
"Super, Semicolon, splitratio, -0.1"
|
|
"Super, Apostrophe, splitratio, +0.1"
|
|
"Super, Minus, exec, qs -c $qsConfig ipc call zoom zoomOut"
|
|
"Super, Equal, exec, qs -c $qsConfig ipc call zoom zoomIn"
|
|
"Super, Minus, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1"
|
|
"Super, Equal, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1"
|
|
];
|
|
};
|
|
}
|