From ff4365ab6de9b3e3e65738c77710cd8a318e7af7 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Fri, 28 Feb 2025 10:16:35 -0300 Subject: [PATCH] hypr: add bindings for resizing with hjkl --- hypr/autostart.conf | 2 +- hypr/bindings.conf | 46 ++++++++++++++++++++++++++++++------------- hypr/environment.conf | 2 +- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/hypr/autostart.conf b/hypr/autostart.conf index 3a41e48..4ca6dbd 100644 --- a/hypr/autostart.conf +++ b/hypr/autostart.conf @@ -21,5 +21,5 @@ exec-once = sh $HOME/.config/hypr/scripts/night-light-check.sh exec-once = ags run --log-file $HOME/ags.log # Apps -exec-once = discord --start-minimized +exec-once = vesktop --start-minimized exec-once = steam -silent diff --git a/hypr/bindings.conf b/hypr/bindings.conf index 81ed705..dff12f2 100644 --- a/hypr/bindings.conf +++ b/hypr/bindings.conf @@ -1,22 +1,27 @@ -############## -## BINDINGS ## -############## +############### +## VARIABLES ## +############### +# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables -# https://wiki.hyprland.org/Configuring/Keywords and https://wiki.hyprland.org/Configuring/Binds for information on how to configure input +$mainMod = SUPER # The master key + +$media = amberol # Media App +$terminal = kitty # Terminal Emulator +$fm = nautilus # File Manager +$menu = anyrun # App Runner +$dmenu = anyrun --plugins libstdin.so # dmenu app -$terminal = kitty -$fileManager = nautilus -$menu = anyrun -$dmenu = anyrun --plugins libstdin.so -$mainMod = SUPER $lockscreen = hyprlock $screenshotDir = $HOME/Screenshots $screenshotFull = hyprshot -m output -o $screenshotDir $screenshotSelect = hyprshot -m region -o $screenshotDir -$media = amberol + +############## +## BINDINGS ## +############## +# Wiki: https://wiki.hyprland.org/Configuring/Binds -# Main binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, K, exec, $terminal bind = $mainMod, Q, killactive bind = $mainMod, E, exec, $fileManager @@ -25,6 +30,7 @@ bind = $mainMod, SPACE, exec, $menu bind = $mainMod, P, pseudo, bind = $mainMod, J, togglesplit bind = $mainMod, N, exec, astal toggle control-center +bind = $mainMod, M, exec, astal toggle center-window bind = $mainMod, L, exec, $lockscreen bind = $mainMod, F11, fullscreen @@ -54,12 +60,17 @@ bind = $mainMod, W, exec, sh $XDG_CONFIG_HOME/hypr/scripts/change-wallpaper.sh # Reload UI(Astal and AGS) bind = $mainMod, F7, exec, ags request reload +################## +### NAVIGATION ### +################## + # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d + # Move windows with keyboard keys bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r @@ -67,11 +78,18 @@ bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d bind = $mainMod SHIFT, C, centerwindow -# Resize windows with arrowkeys + +# Resize windows with arrow keys / hjkl bind = $mainMod ALT, left, resizeactive, -60 0 -bind = $mainMod ALT, right, resizeactive, 60 0 -bind = $mainMod ALT, up, resizeactive, 0 -60 bind = $mainMod ALT, down, resizeactive, 0 60 +bind = $mainMod ALT, up, resizeactive, 0 -60 +bind = $mainMod ALT, right, resizeactive, 60 0 + +bind = $mainMod ALT, H, resizeactive, -60 0 +bind = $mainMod ALT, J, resizeactive, 0 60 +bind = $mainMod ALT, K, resizeactive, 0 -60 +bind = $mainMod ALT, L, resizeactive, 60 0 + # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 diff --git a/hypr/environment.conf b/hypr/environment.conf index f56a134..41fdfec 100644 --- a/hypr/environment.conf +++ b/hypr/environment.conf @@ -23,4 +23,4 @@ env = QT_QPA_PLATFORMTHEME, qt5ct env = QT_AUTO_SCREEN_SCALE_FACTOR, 1 env = ADW_DISABLE_PORTAL, 1 env = MOZ_ENABLE_WAYLAND, 1 -#env = ELECTRON_OZONE_PLATFORM_HINT, auto +env = ELECTRON_OZONE_PLATFORM_HINT, auto