Files
dotfiles/dotfiles/.config/hypr/UserConfigs/Keybinds.conf
2026-05-12 20:04:37 +01:00

210 lines
11 KiB
Plaintext

# HyprFlux — https://github.com/ahmad9059/HyprFlux
# This is where you put your own keybinds. Be Mindful to check as well ~/.config/hypr/configs/Keybinds.conf to avoid conflict
# if you think I should replace the Pre-defined Keybinds in ~/.config/hypr/configs/Keybinds.conf , submit an issue or let me know in DC and present me a valid reason as to why, such as conflicting with global shortcuts, etc etc
# See https://wiki.hyprland.org/Configuring/Keywords/ for more settings and variables
# See also Laptops.conf for laptops keybinds
# /* ---- ✴️ Variables ✴️ ---- */ #
$mainMod = SUPER
$scriptsDir = $HOME/.config/hypr/scripts
$UserScripts = $HOME/.config/hypr/UserScripts
# settings for User defaults apps - set your default terminal and file manager on this file
$edit=${EDITOR:-nvim}
# These two are for UserKeybinds.conf & Waybar Modules
$term = foot # Terminal
$files = thunar # File Manager
# Default Search Engine for ROFI Search (SUPER S)
$Search_Engine = "https://www.google.com/search?q={}"
# common shortcuts
bind = $mainMod, SPACE, exec, .config/rofi/launchers/type-4/launcher.sh # desktop overview (if installed)
bind = $mainMod, Q, killactive, # close active (not kill)
bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh # Kill active process
bind = $mainMod, Return, exec, $term #terminal
bind = $mainMod, F, exec, $files #file manager
bind = $mainMod, B, exec, zen-browser # Launch Zen Browser New Everytime
bind = $mainMod, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager
bind = $mainMod, C, exec, code --ozone-platform=x11 # Visual Studio Code
bind = $mainMod, O, exec, obsidian --ozone-platform=x11 # Obsidian
bind = $mainMod, X, exec, vesktop # Vesktop(Discord)
bind = $mainMod, M, exec, fdm # Free Downlaod Manager
bind = $mainMod, W, exec, waypaper # Wayland Wallpaper Setter
bind = $mainMod, L, exec, hyprlock # Screen Locker
bind = $mainMod, DELETE, exec, ~/.config/rofi/powermenu/type-2/powermenu.sh # Power Menu
bind = $mainMod, S, exec, cd /home/thomas/hyprmod && uv run hyprmod # Hyprmod - A Hyprland settings manager (if installed)
bind = $mainMod SHIFT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofirrr
bind = $mainMod, N, exec, swaync-client -t -sw # swayNC notification panel
# FEATURES / EXTRAS
bind = $mainMod SHIFT, F, fullscreen # whole full screen
bind = $mainMod SHIFT, SPACE, togglefloating, #Float Mode
# Desktop zooming or magnifier
bind = $mainMod ALT, mouse_down, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')"
bind = $mainMod ALT, mouse_up, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')"
## NOTES for ja (Hyprland version 0.39 (Ubuntu 24.04))
#bind = $mainMod ALT, mouse_down, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')"
#bind = $mainMod ALT, mouse_up, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')"
# Waybar / Bar related
bind = $mainMod CTRL ALT, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar
# FEATURES / EXTRAS (UserScripts)
bind = $mainMod SHIFT, A, exec, $scriptsDir/Animations.sh #hyprland animations menu
bind = $mainMod SHIFT, Z, exec, $UserScripts/ZshChangeTheme.sh # Change oh-my-zsh theme
#######################################################################################################################################
#Default Keybinds#
#######################################################################################################################################
bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 # exit Hyprland
# Master Layout
bind = $mainMod CTRL, D, layoutmsg, removemaster
bind = $mainMod, I, layoutmsg, addmaster
bind = $mainMod, J, layoutmsg, cyclenext
bind = $mainMod, K, layoutmsg, cycleprev
bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster
# Dwindle Layout
bind = $mainMod, P, pseudo, # dwindle
# Special Keys / Hot Keys
bindel = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc # volume up
bindel = , xf86audiolowervolume, exec, $scriptsDir/Volume.sh --dec # volume down
bindl = , xf86AudioMicMute, exec, $scriptsDir/Volume.sh --toggle-mic # mic mute
bindl = , xf86audiomute, exec, $scriptsDir/Volume.sh --toggle # mute
bindl = , xf86Sleep, exec, systemctl suspend # sleep button
bindl = , xf86Rfkill, exec, $scriptsDir/AirplaneMode.sh # Airplane mode
# media controls using keyboards
bindl = , xf86AudioPlayPause, exec, $scriptsDir/MediaCtrl.sh --pause
bindl = , xf86AudioPause, exec, $scriptsDir/MediaCtrl.sh --pause
bindl = , xf86AudioPlay, exec, $scriptsDir/MediaCtrl.sh --pause
bindl = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt
bindl = , xf86AudioPrev, exec, $scriptsDir/MediaCtrl.sh --prv
bindl = , xf86audiostop, exec, $scriptsDir/MediaCtrl.sh --stop
# Resize windows
binde = $mainMod SHIFT, left, resizeactive,-50 0
binde = $mainMod SHIFT, right, resizeactive,50 0
binde = $mainMod SHIFT, up, resizeactive,0 -50
binde = $mainMod SHIFT, down, resizeactive,0 50
# Move windows
bind = $mainMod CTRL, left, movewindow, l
bind = $mainMod CTRL, right, movewindow, r
bind = $mainMod CTRL, up, movewindow, u
bind = $mainMod CTRL, down, movewindow, d
# Swap windows
bind = $mainMod ALT, left, swapwindow, l
bind = $mainMod ALT, right, swapwindow, r
bind = $mainMod ALT, up, swapwindow, u
bind = $mainMod ALT, down, swapwindow, d
# 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
# Workspaces related
bind = $mainMod, tab, workspace, m+1
bind = $mainMod SHIFT, tab, workspace, m-1
# Special workspace
# bind = $mainMod SHIFT, U, movetoworkspace, special
# bind = $mainMod, U, togglespecialworkspace,
bind = $mainMod, U, togglespecialworkspace, nyx
bind = $mainMod SHIFT, U, movetoworkspace, special:nyx
# The following mappings use the key codes to better support various keyboard layouts
# 1 is code:10, 2 is code 11, etc
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, code:10, workspace, 1 # NOTE: code:10 = key 1
bind = $mainMod, code:11, workspace, 2 # NOTE: code:11 = key 2
bind = $mainMod, code:12, workspace, 3 # NOTE: code:12 = key 3
bind = $mainMod, code:13, workspace, 4 # NOTE: code:13 = key 4
bind = $mainMod, code:14, workspace, 5 # NOTE: code:14 = key 5
bind = $mainMod, code:15, workspace, 6 # NOTE: code:15 = key 6
bind = $mainMod, code:16, workspace, 7 # NOTE: code:16 = key 7
bind = $mainMod, code:17, workspace, 8 # NOTE: code:17 = key 8
bind = $mainMod, code:18, workspace, 9 # NOTE: code:18 = key 9
bind = $mainMod, code:19, workspace, 10 # NOTE: code:19 = key 0
# Move active window and follow to workspace mainMod + SHIFT [0-9]
bind = $mainMod SHIFT, code:10, movetoworkspace, 1 # NOTE: code:10 = key 1
bind = $mainMod SHIFT, code:11, movetoworkspace, 2 # NOTE: code:11 = key 2
bind = $mainMod SHIFT, code:12, movetoworkspace, 3 # NOTE: code:12 = key 3
bind = $mainMod SHIFT, code:13, movetoworkspace, 4 # NOTE: code:13 = key 4
bind = $mainMod SHIFT, code:14, movetoworkspace, 5 # NOTE: code:14 = key 5
bind = $mainMod SHIFT, code:15, movetoworkspace, 6 # NOTE: code:15 = key 6
bind = $mainMod SHIFT, code:16, movetoworkspace, 7 # NOTE: code:16 = key 7
bind = $mainMod SHIFT, code:17, movetoworkspace, 8 # NOTE: code:17 = key 8
bind = $mainMod SHIFT, code:18, movetoworkspace, 9 # NOTE: code:18 = key 9
bind = $mainMod SHIFT, code:19, movetoworkspace, 10 # NOTE: code:19 = key 0
bind = $mainMod SHIFT, bracketleft, movetoworkspace, -1 # brackets [
bind = $mainMod SHIFT, bracketright, movetoworkspace, +1 # brackets ]
# Move active window to a workspace silently mainMod + CTRL [0-9]
bind = $mainMod CTRL, code:10, movetoworkspacesilent, 1 # NOTE: code:10 = key 1
bind = $mainMod CTRL, code:11, movetoworkspacesilent, 2 # NOTE: code:11 = key 2
bind = $mainMod CTRL, code:12, movetoworkspacesilent, 3 # NOTE: code:12 = key 3
bind = $mainMod CTRL, code:13, movetoworkspacesilent, 4 # NOTE: code:13 = key 4
bind = $mainMod CTRL, code:14, movetoworkspacesilent, 5 # NOTE: code:14 = key 5
bind = $mainMod CTRL, code:15, movetoworkspacesilent, 6 # NOTE: code:15 = key 6
bind = $mainMod CTRL, code:16, movetoworkspacesilent, 7 # NOTE: code:16 = key 7
bind = $mainMod CTRL, code:17, movetoworkspacesilent, 8 # NOTE: code:17 = key 8
bind = $mainMod CTRL, code:18, movetoworkspacesilent, 9 # NOTE: code:18 = key 9
bind = $mainMod CTRL, code:19, movetoworkspacesilent, 10 # NOTE: code:19 = key 0
bind = $mainMod CTRL, bracketleft, movetoworkspacesilent, -1 # brackets [
bind = $mainMod CTRL, bracketright, movetoworkspacesilent, +1 # brackets ]
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, period, workspace, e+1
bind = $mainMod, comma, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow # NOTE: mouse:272 = left click
bindm = $mainMod, mouse:273, resizewindow # NOTE: mouse:272 = right click
#########################################################################################################
# Laptop specific keybinds
#########################################################################################################
# for disabling Touchpad. hyprctl devices to get device name.
$Touchpad_Device=asue1209:00-04f3:319f-touchpad
binde = , xf86KbdBrightnessDown, exec, $scriptsDir/BrightnessKbd.sh --dec # decrease keyboard brightness
binde = , xf86KbdBrightnessUp, exec, $scriptsDir/BrightnessKbd.sh --inc # increase keyboard brightness
bind = , xf86Launch1, exec, rog-control-center # ASUS Armory crate button
bind = , xf86Launch3, exec, asusctl led-mode -n # FN+F4 Switch keyboard RGB profile
bind = , xf86Launch4, exec, asusctl profile -n # FN+F5 change of fan profiles (Quite, Balance, Performance)
binde = , xf86MonBrightnessDown, exec, $scriptsDir/Brightness.sh --dec # decrease monitor brightness
binde = , xf86MonBrightnessUp, exec, $scriptsDir/Brightness.sh --inc # increase monitor brightness
bind = , xf86TouchpadToggle, exec, $scriptsDir/TouchPad.sh # disable touchpad
# Screenshot keybindings using F6 (no PrinSrc button)
#bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # screenshot
#bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area)
#bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # # screenshot (5 secs delay)
#bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # screenshot (10 secs delay)
#bind = ALT, F6, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only)
$TOUCHPAD_ENABLED = true
device {
name = $Touchpad_Device
enabled = $TOUCHPAD_ENABLED
}