Files
dotfiles/env/.config/hypr/keybinds.conf

149 lines
8.3 KiB
Plaintext

##############################
### HYPRLAND - KEYBINDINGS ###
##############################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # "Command/Windows" key as main modifier
$windowMod = CTRL ALT # Control + Option for window controls.
$HYPER = ALT SHIFT SUPER CTRL
# See https://wiki.hyprland.org/Configuring/Keywords/
$terminal = ghostty
$browser = zen-browser
$fileManager = $terminal -e yazi
$fileBrowser = nautilus
$menu = walker
$scripts = ~/.local/scripts
$pwa = $scripts/launch-webapp
$launchOrFocusWebapp = $scripts/launch-or-focus-webapp
$tmuxSessionator = $scripts/tmux-sessionator
$clipboardHistory = $terminal --class=com.ghostty.float -e $scripts/uninstall-desktop-app
$uninstallDesktop = $terminal --class=com.ghostty.float -e $scripts/uninstall-desktop-app
$housecallPro = $pwa "https://pro.housecallpro.com/app/calendar_new"
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
######################################################
# Apps / hyprland controls
#
# These should in general use the $mainMod prefix
######################################################
# MOD # KEY # DESC # Action #
######################################################
bindd = $mainMod, Space, Application launcher, exec, $menu
bindd = $mainMod, Return, New terminal, exec, $terminal
bindd = $mainMod SHIFT, Return, New floating terminal, exec, $terminal --class=com.ghostty.float
bindd = $mainMod, A, Chat-gpt [a]i, exec, $pwa "https://chatgpt.com" --class com.chromium.chatgpt
bindd = $mainMod, B, New [b]rowser, exec, $browser
bindd = $mainMod SHIFT, B, New private [b]rowser, exec, $browser --private-window
bindd = $mainMod, C, [C]onfig folder in tmux session, exec, $terminal -e $tmuxSessionator ~/.config
bindd = $mainMod, D, [D]ispatch app, exec, $housecallPro
bindd = $mainMod SHIFT, D, Show [d]esktop / hide all windows, exec, $scripts/toggle-desktop
bindd = $mainMod, E, [E]mail - personal, exec, $pwa "https://mail.proton.me"
bindd = $mainMod SHIFT, E, [E]mail - work, exec, uwsm app -- thunderbird
bindd = $mainMod, F, [F]ile manager - terminal, exec, $fileManager
bindd = $mainMod SHIFT, F, [F]ile manager - application, exec, $fileBrowser
bindd = $mainMod, G, [G]itea, exec, $pwa "https://git.housh.dev"
bindd = $mainMod, H, Focus window - left, movefocus, l # move window focus using vim keys
bindd = $mainMod SHIFT, H, Workspace - back, workspace, -1
bindd = $mainMod, J, Focus window - down, movefocus, d # move window focus using vim keys
bindd = $mainMod, K, Focus window - up, movefocus, u # move window focus using vim keys
bindd = $mainMod, L, Focus window - right, movefocus, r # move window focus using vim keys
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
bindd = $mainMod, M, [M]usic - apple, exec, $pwa "https://music.apple.com"
bindd = $mainMod SHIFT, M, [M]enu bar - toggle visible, exec, ~/.local/scripts/toggle-waybar
bindd = $mainMod, P, [P]assword manager, exec, ~/.local/scripts/proton-pass-manager
bindd = $mainMod SHIFT, P, Toggle [p]seudo window mode, pseudo, # dwindle
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, ~/.local/scripts/waybar-restart
bindd = $mainMod, S, Toggle [s]pecial workspace, togglespecialworkspace, magic # use $windowMod S to send window to the special workspace
bindd = $mainMod, Y, [Y]ouTube, exec, $pwa "https://youtube.com"
bindd = $mainMod, U, [U]nifi, exec, $pwa "https://unifi.ui.com"
bindd = $mainMod SHIFT, U, [U]ninstall desktop app, exec, $uninstallDesktop
bindd = $mainMod, V, Clipboard history, exec, $clipboardHistory
bindd = $mainMod, W, Close current window, killactive,
# Switch to workspaces with mainMod + [0-9]
bindd = $mainMod, 1, Switch to workspace [1], workspace, 1
bindd = $mainMod, 2, Switch to workspace [2], workspace, 2
bindd = $mainMod, 3, Switch to workspace [3], workspace, 3
bindd = $mainMod, 4, Switch to workspace [4], workspace, 4
bindd = $mainMod, 5, Switch to workspace [5], workspace, 5
bindd = $mainMod, 6, Switch to workspace [6], workspace, 6
bindd = $mainMod, 7, Switch to workspace [7], workspace, 7
bindd = $mainMod, 8, Switch to workspace [8], workspace, 8
bindd = $mainMod, 9, Switch to workspace [9], workspace, 9
bindd = $mainMod, 0, Switch to workspace 1[0], workspace, 10
# Move all workspaces to a monitor
bindd = $mainMod SHIFT, 1, Switch all workspaces to monitor [1], exec, $scripts/mv-all-workspaces-to-monitor 1
bindd = $mainMod SHIFT, 0, Switch all workspaces to monitor [0], exec, $scripts/mv-all-workspaces-to-monitor 0
####################################################
# Window controls
#
# These should in general use the $windowMod prefix
######################################################
# MOD # KEY # DESC # Action #
######################################################
bindd = CTRL SHIFT, F, Toggle [f]loating, exec, $scripts/window-toggle-floating
# TODO: Decide which is prefered to switch to fullscreen.
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, H, Move window - left, movewindow, l # move windows with windowMod + vim keys
bindd = $windowMod, J, Move window - down, movewindow, d # move windows with windowMod + vim keys
bindd = $windowMod, K, Move window - up, movewindow, u # move windows with windowMod + vim keys
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
bindd = $HYPER, J, Toggle split orientation, togglesplit # dwindle
bindd = $windowMod, S, Move window to [s]pecial workspace, movetoworkspacesilent, special:magic
# 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
bindd = $windowMod, EQUAL, Increase window size - horizontal, resizeactive, 20 0
bindd = $windowMod, MINUS, Decrease window size - horizontal, resizeactive, -20 0
# Resize vertically
bindd = $windowMod SHIFT, EQUAL, Increase window size - vertical, resizeactive, 0 20
bindd = $windowMod SHIFT, MINUS, Decrease window size - vertical, resizeactive, 0 -20
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bindd = $windowMod, 1, Move window to workspace [1], movetoworkspace, 1
bindd = $windowMod, 2, Move window to workspace [2], movetoworkspace, 2
bindd = $windowMod, 3, Move window to workspace [3], movetoworkspace, 3
bindd = $windowMod, 4, Move window to workspace [4], movetoworkspace, 4
bindd = $windowMod, 5, Move window to workspace [5], movetoworkspace, 5
bindd = $windowMod, 6, Move window to workspace [6], movetoworkspace, 6
bindd = $windowMod, 7, Move window to workspace [7], movetoworkspace, 7
bindd = $windowMod, 8, Move window to workspace [8], movetoworkspace, 8
bindd = $windowMod, 9, Move window to workspace [9], movetoworkspace, 9
bindd = $windowMod, 0, Move window to workspace 1[0], movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
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%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous