Hyprland dotfiles
| 1 | # /* ---- 馃挮 https://github.com/JaKooLit 馃挮 ---- */ # |
| 2 | # Default Keybinds |
| 3 | # visit https://wiki.hyprland.org/Configuring/Binds/ for more info |
| 4 | |
| 5 | # /* ---- 鉁达笍 Variables 鉁达笍 ---- */ # |
| 6 | $mainMod = SUPER |
| 7 | $scriptsDir = $HOME/.config/hypr/scripts |
| 8 | $UserConfigs = $HOME/.config/hypr/UserConfigs |
| 9 | $UserScripts = $HOME/.config/hypr/UserScripts |
| 10 | |
| 11 | bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 # exit Hyprland |
| 12 | bind = $mainMod, Q, killactive, # close active (not kill) |
| 13 | bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh # Kill active process |
| 14 | bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh # screen lock |
| 15 | bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh # power menu |
| 16 | bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC notification panel |
| 17 | bind = $mainMod SHIFT, E, exec, $scriptsDir/Kool_Quick_Settings.sh # Settings Menu KooL Hyprland Settings |
| 18 | |
| 19 | # Master Layout |
| 20 | bind = $mainMod CTRL, D, layoutmsg, removemaster |
| 21 | bind = $mainMod, I, layoutmsg, addmaster |
| 22 | bind = $mainMod, J, layoutmsg, cyclenext |
| 23 | bind = $mainMod, K, layoutmsg, cycleprev |
| 24 | bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster |
| 25 | |
| 26 | # Dwindle Layout |
| 27 | # bind = $mainMod SHIFT, I, togglesplit # only works on dwindle layout |
| 28 | # bind = $mainMod, P, pseudo, # dwindle |
| 29 | |
| 30 | # Works on either layout (Master or Dwindle) |
| 31 | bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3 |
| 32 | |
| 33 | # group |
| 34 | # bind = $mainMod, G, togglegroup # toggle group |
| 35 | bind = $mainMod CTRL, tab, changegroupactive # change focus to another window |
| 36 | |
| 37 | # Cycle windows if floating bring to top |
| 38 | bind = ALT, tab, cyclenext |
| 39 | bind = ALT, tab, bringactivetotop |
| 40 | |
| 41 | # Special Keys / Hot Keys |
| 42 | bindel = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc # volume up |
| 43 | bindel = , xf86audiolowervolume, exec, $scriptsDir/Volume.sh --dec # volume down |
| 44 | bindl = , xf86AudioMicMute, exec, $scriptsDir/Volume.sh --toggle-mic # mic mute |
| 45 | bindl = , xf86audiomute, exec, $scriptsDir/Volume.sh --toggle # mute |
| 46 | bindl = , xf86Sleep, exec, systemctl suspend # sleep button |
| 47 | bindl = , xf86Rfkill, exec, $scriptsDir/AirplaneMode.sh # Airplane mode |
| 48 | |
| 49 | # media controls using keyboards |
| 50 | bindl = , xf86AudioPlayPause, exec, $scriptsDir/MediaCtrl.sh --pause |
| 51 | bindl = , xf86AudioPause, exec, $scriptsDir/MediaCtrl.sh --pause |
| 52 | bindl = , xf86AudioPlay, exec, $scriptsDir/MediaCtrl.sh --pause |
| 53 | bindl = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt |
| 54 | bindl = , xf86AudioPrev, exec, $scriptsDir/MediaCtrl.sh --prv |
| 55 | bindl = , xf86audiostop, exec, $scriptsDir/MediaCtrl.sh --stop |
| 56 | |
| 57 | # Screenshot keybindings NOTE: You may need to press Fn key as well |
| 58 | bind = $mainMod, F10, exec, $scriptsDir/ScreenShot.sh --now # screenshot |
| 59 | bind = $mainMod SHIFT, F10, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area) |
| 60 | bind = $mainMod CTRL, F10, exec, $scriptsDir/ScreenShot.sh --in5 # screenshot (5 secs delay) |
| 61 | bind = $mainMod CTRL SHIFT, F10, exec, $scriptsDir/ScreenShot.sh --in10 # screenshot (10 secs delay) |
| 62 | bind = ALT, F10, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only) |
| 63 | |
| 64 | # screenshot with swappy (another screenshot tool) |
| 65 | bind = $mainMod SHIFT, S, exec, wayfreeze & PID=$!; sleep 0.1; grim -g "$(slurp)" - | wl-copy; kill $PID # screenshot: freeze screen, select region |
| 66 | |
| 67 | # Resize windows |
| 68 | binde = $mainMod SHIFT, left, resizeactive,-50 0 |
| 69 | binde = $mainMod SHIFT, right, resizeactive,50 0 |
| 70 | binde = $mainMod SHIFT, up, resizeactive,0 -50 |
| 71 | binde = $mainMod SHIFT, down, resizeactive,0 50 |
| 72 | |
| 73 | # Move windows |
| 74 | bind = $mainMod CTRL, left, movewindow, l |
| 75 | bind = $mainMod CTRL, right, movewindow, r |
| 76 | bind = $mainMod CTRL, up, movewindow, u |
| 77 | bind = $mainMod CTRL, down, movewindow, d |
| 78 | |
| 79 | # Swap windows |
| 80 | bind = $mainMod ALT, left, swapwindow, l |
| 81 | bind = $mainMod ALT, right, swapwindow, r |
| 82 | bind = $mainMod ALT, up, swapwindow, u |
| 83 | bind = $mainMod ALT, down, swapwindow, d |
| 84 | |
| 85 | # Move focus with mainMod + arrow keys |
| 86 | bind = $mainMod, left, movefocus, l |
| 87 | bind = $mainMod, right, movefocus, r |
| 88 | bind = $mainMod, up, movefocus, u |
| 89 | bind = $mainMod, down, movefocus, d |
| 90 | |
| 91 | # Workspaces related |
| 92 | bind = $mainMod, tab, workspace, m+1 |
| 93 | bind = $mainMod SHIFT, tab, workspace, m-1 |
| 94 | |
| 95 | # Special workspace |
| 96 | bind = $mainMod SHIFT, U, movetoworkspace, special |
| 97 | bind = $mainMod, U, togglespecialworkspace, |
| 98 | |
| 99 | # The following mappings use the key codes to better support various keyboard layouts |
| 100 | # 1 is code:10, 2 is code 11, etc |
| 101 | # Switch workspaces with mainMod + [0-9] |
| 102 | bind = $mainMod, code:10, workspace, 1 # NOTE: code:10 = key 1 |
| 103 | bind = $mainMod, code:11, workspace, 2 # NOTE: code:11 = key 2 |
| 104 | bind = $mainMod, code:12, workspace, 3 # NOTE: code:12 = key 3 |
| 105 | bind = $mainMod, code:13, workspace, 4 # NOTE: code:13 = key 4 |
| 106 | bind = $mainMod, code:14, workspace, 5 # NOTE: code:14 = key 5 |
| 107 | bind = $mainMod, code:15, workspace, 6 # NOTE: code:15 = key 6 |
| 108 | bind = $mainMod, code:16, workspace, 7 # NOTE: code:16 = key 7 |
| 109 | bind = $mainMod, code:17, workspace, 8 # NOTE: code:17 = key 8 |
| 110 | bind = $mainMod, code:18, workspace, 9 # NOTE: code:18 = key 9 |
| 111 | bind = $mainMod, code:19, workspace, 10 # NOTE: code:19 = key 0 |
| 112 | |
| 113 | # Move active window and follow to workspace mainMod + CTRL [0-9] |
| 114 | bind = $mainMod CTRL, code:10, movetoworkspace, 1 # NOTE: code:10 = key 1 |
| 115 | bind = $mainMod CTRL, code:11, movetoworkspace, 2 # NOTE: code:11 = key 2 |
| 116 | bind = $mainMod CTRL, code:12, movetoworkspace, 3 # NOTE: code:12 = key 3 |
| 117 | bind = $mainMod CTRL, code:13, movetoworkspace, 4 # NOTE: code:13 = key 4 |
| 118 | bind = $mainMod CTRL, code:14, movetoworkspace, 5 # NOTE: code:14 = key 5 |
| 119 | bind = $mainMod CTRL, code:15, movetoworkspace, 6 # NOTE: code:15 = key 6 |
| 120 | bind = $mainMod CTRL, code:16, movetoworkspace, 7 # NOTE: code:16 = key 7 |
| 121 | bind = $mainMod CTRL, code:17, movetoworkspace, 8 # NOTE: code:17 = key 8 |
| 122 | bind = $mainMod CTRL, code:18, movetoworkspace, 9 # NOTE: code:18 = key 9 |
| 123 | bind = $mainMod CTRL, code:19, movetoworkspace, 10 # NOTE: code:19 = key 0 |
| 124 | bind = $mainMod CTRL, bracketleft, movetoworkspace, -1 # brackets [ |
| 125 | bind = $mainMod CTRL, bracketright, movetoworkspace, +1 # brackets ] |
| 126 | |
| 127 | # Scroll through existing workspaces with mainMod + scroll |
| 128 | bind = $mainMod, mouse_down, workspace, e+1 |
| 129 | bind = $mainMod, mouse_up, workspace, e-1 |
| 130 | bind = $mainMod, period, workspace, e+1 |
| 131 | bind = $mainMod, comma, workspace, e-1 |
| 132 | |
| 133 | # Move/resize windows with mainMod + LMB/RMB and dragging |
| 134 | bindm = $mainMod, mouse:272, movewindow # NOTE: mouse:272 = left click |
| 135 | bindm = $mainMod, mouse:273, resizewindow # NOTE: mouse:272 = right click |