dotfiles/.config/hypr/configs/binds.conf
Sergio Laín 01ee540655
♻️ refactor(hypr): whole binds config file
using mainmod variable instead of super, default apps file and some other misc changes
2024-05-26 20:20:36 +02:00

198 lines
7.1 KiB
Text

# Variables
source = ~/.config/hypr/configs/default_apps.conf
$mainMod = SUPER
$scripts = ~/.config/hypr/scripts
$rofi-scripts = ~/.config/rofi/scripts
# Mouse binds
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Basic keybinds
bind = $mainMod, Q, killactive,
bind = $mainMod CTRL, R, exec, killall $bar; $bar
bind = $mainMod SHIFT, R, exec, swaync -R && swaync -rs
bind = $mainMod, A, exec, $scripts/toggle_floating
bind = $mainMod, P, pseudo
bind = $mainMod, F, fullscreen, 0
bind = $mainMod, Z, exec, pypr zoom
# Applications
bind = $mainMod, W, exec, $browser
bind = $mainMod, O, exec, $notetaking-app
bind = $mainMod SHIFT, O, exec, $office-suite
bind = $mainMod SHIFT, E,exec, $alter-file-manager
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod SHIFT, RETURN, exec, $terminal --class=center-float-large
bind = $mainMod ALT, RETURN, exec, $terminal --class=center-float
bind = $mainMod CTRL, RETURN, exec, $terminal --class=center-float-mini
bind = $mainMod, BACKSPACE, exec, $editor
bind = $mainMod SHIFT, BACKSPACE, exec, $alter-editor
# Pickers/Launchers
bind = $mainMod, 23, exec, $launcher # Tab
bind = $mainMod, INSERT, exec, $scripts/color_picker
bind = $mainMod SHIFT, W, exec, $rofi-scripts/wallpaper/wallpaper
bind = $mainMod, 61, exec, $rofi-scripts/keybindings/keybindings # /
bind = $mainMod SHIFT, G, exec, rofi -modi games -show games -theme $rofi-scripts/game-launcher/style
bind = $mainMod, Y, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
# Scratchpads
bind = $mainMod, V, exec, pypr toggle volume
bind = $mainMod, 51, exec, pypr toggle terminal # Backslash
bind = $mainMod, B, exec, pypr toggle btop
bind = $mainMod SHIFT, I, exec, pypr toggle gpt
bind = $mainMod SHIFT, B, exec, pypr toggle bluetooth
bind = $mainMod, E, exec, pypr toggle yazi
bind = $mainMod, D, exec, pypr toggle dots
bind = $mainMod SHIFT, C, exec, pypr toggle cava
bind = $mainMod, U, exec, pypr toggle topgrade-system
bind = $mainMod SHIFT, U, exec, pypr toggle topgrade-all
# Screenshots
bind = CTRL, ESCAPE, exec, $rofi-scripts/screenshot/screenshot
bind = SHIFT, ESCAPE, exec, $rofi-scripts/screenshot/screenshot --freeze
# Misc stuff
bind = $mainMod CTRL, W, exec, pypr wall next
# Notifications menu
bind = $mainMod, N, exec, $notifications-menu
# Logout menu
bind = $mainMod, ESCAPE, exec, $rofi-scripts/powermenu/powermenu
# Windows
# Focusing on windows
bind = $mainMod, LEFT, movefocus, l
bind = $mainMod, RIGHT, movefocus, r
bind = $mainMod, UP, movefocus, u
bind = $mainMod, DOWN, movefocus, d
# Vim-keybinds
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Moving windows
bind = $mainMod SHIFT, LEFT, movewindow, l
bind = $mainMod SHIFT, RIGHT, movewindow, r
bind = $mainMod SHIFT, UP, movewindow, u
bind = $mainMod SHIFT, DOWN, movewindow, d
# Vim-keybinds
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, 51, exec, $scripts/move_by_rules # Backslash
# Center and split
bind = $mainMod, S, togglesplit
bind = $mainMod, C, exec, hyprctl dispatch centerwindow 1
# Workspaces
# Focusing other workspaces
bind = $mainMod, 1, workspace, r~1
bind = $mainMod, 2, workspace, r~2
bind = $mainMod, 3, workspace, r~3
bind = $mainMod, 4, workspace, r~4
bind = $mainMod, 5, workspace, r~5
bind = $mainMod, 6, workspace, r~6
bind = $mainMod, 7, workspace, r~7
bind = $mainMod, 8, workspace, r~8
bind = $mainMod, 9, workspace, r~9
# Moving windows to other workspaces
bind = $mainMod SHIFT, 1, movetoworkspace, r~1
bind = $mainMod SHIFT, 2, movetoworkspace, r~2
bind = $mainMod SHIFT, 3, movetoworkspace, r~3
bind = $mainMod SHIFT, 4, movetoworkspace, r~4
bind = $mainMod SHIFT, 5, movetoworkspace, r~5
bind = $mainMod SHIFT, 6, movetoworkspace, r~6
bind = $mainMod SHIFT, 7, movetoworkspace, r~7
bind = $mainMod SHIFT, 8, movetoworkspace, r~8
bind = $mainMod SHIFT, 9, movetoworkspace, r~9
# Moving windows to other workspaces (silent)
bind = $mainMod ALT, 1, movetoworkspacesilent, r~1
bind = $mainMod ALT, 2, movetoworkspacesilent, r~2
bind = $mainMod ALT, 3, movetoworkspacesilent, r~3
bind = $mainMod ALT, 4, movetoworkspacesilent, r~4
bind = $mainMod ALT, 5, movetoworkspacesilent, r~5
bind = $mainMod ALT, 6, movetoworkspacesilent, r~6
bind = $mainMod ALT, 7, movetoworkspacesilent, r~7
bind = $mainMod ALT, 8, movetoworkspacesilent, r~8
bind = $mainMod ALT, 9, movetoworkspacesilent, r~9
# Moving to other workspace with mouse control
bind = $mainMod, mouse_down, workspace, m-1
bind = $mainMod, mouse_up, workspace, m+1
# Moving to other workspace with keyboard
bind = $mainMod CTRL, LEFT, workspace, m-1
bind = $mainMod CTRL, RIGHT, workspace, m+1
bind = $mainMod CTRL, H, workspace, m-1
bind = $mainMod CTRL, L, workspace, m+1
# Moving to next and prev monitors
bind = $mainMod, 59, focusmonitor, -1 # Comma
bind = $mainMod, 60, focusmonitor, +1 # Period
# Group control
bind = $mainMod, G, togglegroup
bind = ALT, TAB, changegroupactive
# Submap for resizing windows
bind = $mainMod, R, submap, resize
submap = resize
binde = , RIGHT, resizeactive, 40 0
binde = , LEFT, resizeactive, -40 0
binde = , UP, resizeactive, 0 -40
binde = , DOWN, resizeactive, 0 40
binde = , L, resizeactive, 40 0
binde = , H, resizeactive, -40 0
binde = , K, resizeactive, 0 -40
binde = , J, resizeactive, 0 40
bind = , ESCAPE, submap, reset
submap = reset
# Audio
bind = $mainMod CTRL, V, exec, ~/.local/bin/restartAudio
bindl = $mainMod CTRL, mouse:280, exec, swayosd-client --output-volume mute-toggle # Extra Up Button
bindl = , XF86AudioMute, exec, swayosd-client --output-volume mute-toggle
bindl = $mainMod CTRL, mouse:281, exec, swayosd-client --input-volume mute-toggle # Extra Down Button
bindl = , XF86AudioMicMute, exec, exec swayosd-client --input-volume mute-toggle
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = $mainMod CTRL, mouse:282, exec, playerctl play-pause # Extra Center Button
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = $mainMod CTRL, mouse:275, exec, playerctl previous # Extra Back Button
bindl = , XF86AudioNext, exec, playerctl next
bindl = $mainMod CTRL, mouse:276, exec, playerctl next # Extra Forward Button
bindle = , XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise
bindle = $mainMod CTRL, 21, exec, swayosd-client --output-volume raise # Minus key
bindle = , XF86AudioLowerVolume, exec, swayosd-client --output-volume lower
bindle = $mainMod CTRL, 20, exec, swayosd-client --output-volume lower # Plus key
bindle = , XF86InputRaiseVolume, exec, swayosd-client --input-volume raise
bindle = $mainMod SHIFT, 21, exec, swayosd-client --input-volume raise # Minus key
bindle = , XF86InputLowerVolume, exec, swayosd-client --input-volume lower
bindle = $mainMod SHIFT, 20, exec, swayosd-client --input-volume lower # Plus key
# Disable anim, blur, etc
bind = $mainMod, F12, exec, $scripts/performance
# Open Wiki
bind = $mainMod, F1, exec, xdg-open https://wiki.hyprland.org/
bind = $mainMod SHIFT, F1, exec, xdg-open https://github.com/Matt-FTW/dotfiles/wiki
# Freeze active window
bind = $mainMod SHIFT, ESCAPE, exec, $scripts/hyprfreeze -a