From 7d4e5184791b33fd08e4e3b6ff72621d81287079 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Tue, 30 Sep 2025 18:47:11 -0400 Subject: [PATCH] feat: Begins reworking keymaps so that SUPER is for apps / hyprland controls and CTRL OPT are for window controls. --- env/.config/hypr/keybinds.conf | 129 ++++++++++++++------------------- 1 file changed, 54 insertions(+), 75 deletions(-) diff --git a/env/.config/hypr/keybinds.conf b/env/.config/hypr/keybinds.conf index 5a85d0e..17b9a70 100644 --- a/env/.config/hypr/keybinds.conf +++ b/env/.config/hypr/keybinds.conf @@ -5,29 +5,26 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Command/Windows" key as main modifier $HYPER = ALT SHIFT WIN CTRL - -################### -### MY PROGRAMS ### -################### +$windowMod = CTRL OPT # See https://wiki.hyprland.org/Configuring/Keywords/ -# -# Set programs that you use + $terminal = ghostty $browser = zen-browser $fileManager = $terminal -e yazi $fileBrowser = nautilus $menu = walker -#$pwa = chromium --profile-directory=Default --enable-features=UseOzonePlatform --ozone-platform=wayland $pwa = ~/.local/scripts/launch-webapp $launchOrFocusWebapp = ~/.local/scripts/launch-or-focus-webapp # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -# NOTE: TUI's / window rules aren't working with ghostty when you try to target the class -# or title so those should be opened with kitty until I can figure out what's happening. +################################################## +# Apps / hyprland controls +# +# These should in general use the $mainMod prefix +################################################## -# Apps bind = $mainMod, Space, exec, $menu # launcher (set above) bind = $mainMod, Return, exec, $terminal bind = $mainMod SHIFT, Return, exec, $terminal --class=com.ghostty.float @@ -40,60 +37,26 @@ bind = $mainMod SHIFT, D, exec, ~/.local/scripts/toggle-desktop bind = $mainMod, E, exec, $pwa "https://mail.proton.me" bind = $mainMod SHIFT, E, exec, uwsm app -- thunderbird bind = $mainMod, F, exec, $fileManager -#bind = $mainMod, K, exec, $launch Komodo bind = $mainMod SHIFT, F, exec, $fileBrowser bind = $mainMod, G, exec, $pwa "https://git.housh.dev" -# WARN: Do not bind apps to H, J, K, or L! +bind = $mainMod, H, movefocus, l # move window focus using vim keys +bind = $mainMod, J, movefocus, d # move window focus using vim keys +bind = $mainMod, K, movefocus, u # move window focus using vim keys +bind = $mainMod, L, movefocus, r # move window focus using vim keys bind = $mainMod, M, exec, $pwa "https://music.apple.com" bind = $mainMod SHIFT, M, exec, ~/.local/scripts/toggle-waybar bind = $mainMod, N, exec, $terminal -e nvim bind = $mainMod, P, exec, ~/.local/scripts/proton-pass-manager bind = $mainMod SHIFT, P, pseudo, # dwindle bind = $mainMod SHIFT, R, exec, ~/.local/scripts/waybar-restart +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspacesilent, special:magic bind = $mainMod, Y, exec, $pwa "https://youtube.com" bind = $mainMod, U, exec, $pwa "https://unifi.ui.com" bind = $mainMod SHIFT, U, exec, $terminal --class=com.ghostty.float -e ~/.local/scripts/uninstall-desktop-app bind = $mainMod, V, exec, $terminal --class=com.ghostty.clipse -e clipse bind = $mainMod, W, killactive, -# TODO: change modifier key. -#bind = $mainMod SHIFT, L, exec, hyprlock -# TODO: change modifier key. -#bind = $mainMod, V, togglefloating -#bind = $mainMod, P, pseudo, # dwindle -# -# Screenshots -bind = $mainMod SHIFT ALT, 4, exec, hyprshot -m region -o ~/Pictures -bind = $mainMod SHIFT ALT, 3, exec, hyprshot -m window -o ~/Pictures - -bind = CTRL, F, fullscreen, -bind = ctrl shift, f, exec, ~/.local/scripts/window-toggle-floating - -# Move focus with mainMod + arrow keys -bind = $mainMod, H, movefocus, l -bind = $mainMod, L, movefocus, r -bind = $mainMod, K, movefocus, u -bind = $mainMod, J, movefocus, d - -# Move windows with mainMod + Shift -bind = $mainMod SHIFT, H, movewindow, l -#bind = $mainMod SHIFT, H, swapsplit -bind = $mainMod SHIFT, L, movewindow, r -bind = $mainMod SHIFT, K, movewindow, u -bind = $mainMod SHIFT, J, movewindow, d - -bind = $HYPER, J, togglesplit # dwindle - -# FIX: Changes size of window, this works a different depending on if -# the window is on the right or left of the screen. -# -# Resize horizontally -bind = $mainMod, EQUAL, resizeactive, 20 0 -bind = $mainMod, MINUS, resizeactive, -20 0 -# Resize vertically -bind = $mainMod SHIFT, EQUAL, resizeactive, 0 20 -bind = $mainMod SHIFT, MINUS, resizeactive, 0 -20 - # Switch to workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 @@ -107,28 +70,47 @@ bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move all workspaces to a monitor -bind = $HYPER, 0, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 0 -bind = $HYPER, 1, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 1 +bind = $mainMod SHIFT, 1, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 1 +bind = $mainMod SHIFT, 0, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 0 -# Move current workspace. -# bind = $HYPER, H, movecurrentworkspacetomonitor, 1 -# bind = $HYPER, L, movecurrentworkspacetomonitor, 0 +#################################################### +# Window controls +# +# These should in general use the $windowMod prefix +#################################################### + +bind = CTRL SHIFT, f, exec, ~/.local/scripts/window-toggle-floating + +# TODO: Decide which is prefered to switch to fullscreen. +bind = CTRL, F, fullscreen, +bind = $windowMod, F, fullscreen, +bind = $windowMod, H, movewindow, l # move windows with windowMod + vim keys +bind = $windowMod, J, movewindow, d # move windows with windowMod + vim keys +bind = $windowMod, K, movewindow, u # move windows with windowMod + vim keys +bind = $windowMod, L, movewindow, r # move windows with windowMod + vim keys +bind = $HYPER, J, togglesplit # dwindle + +# FIX: Changes size of window, this works a different depending on if +# the window is on the right or left of the screen. +# +# Resize horizontally +bind = $windowMod, EQUAL, resizeactive, 20 0 +bind = $windowMod, MINUS, resizeactive, -20 0 +# Resize vertically +bind = $windowMod SHIFT, EQUAL, resizeactive, 0 20 +bind = $windowMod SHIFT, MINUS, resizeactive, 0 -20 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspacesilent, special:magic +bind = $windowMod, 1, movetoworkspace, 1 +bind = $windowMod, 2, movetoworkspace, 2 +bind = $windowMod, 3, movetoworkspace, 3 +bind = $windowMod, 4, movetoworkspace, 4 +bind = $windowMod, 5, movetoworkspace, 5 +bind = $windowMod, 6, movetoworkspace, 6 +bind = $windowMod, 7, movetoworkspace, 7 +bind = $windowMod, 8, movetoworkspace, 8 +bind = $windowMod, 9, movetoworkspace, 9 +bind = $windowMod, 0, movetoworkspace, 10 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 @@ -139,7 +121,9 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bindm = $mainMod SHIFT, mouse_down, resizewindow - +################################################## +# Multi-media keys +################################################## # Laptop multimedia keys for volume and LCD brightness bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- @@ -154,8 +138,3 @@ bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous -# Shut off laptop monitor when lid is closed and on when lid is open. -# bindl = , switch:on:Lid Switch, exec, hyprctl dispatch dpms off -# bindl = , switch:off:Lid Switch, exec, hyprctl dispatch dpms on - -