mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-27 10:26:58 +02:00
feat(home/linux/gui/hyprland): hypridle & windowrules & keybindings
This commit is contained in:
@@ -1,89 +1,154 @@
|
||||
# https://wiki.hyprland.org/Configuring/Binds/
|
||||
#
|
||||
# Format:
|
||||
# bind = MODS, key, dispatcher, params
|
||||
|
||||
#-- Keybindings ----------------------------------------------------
|
||||
$term = foot
|
||||
$app_launcher = anyrun
|
||||
$mod = ALT # use ALT instead of SUPER, to match the mod key with aerospace on darwin.
|
||||
$files = thunar
|
||||
$browser = firefox
|
||||
|
||||
# -- Terminal --
|
||||
bind=SUPER,Return,exec,$term
|
||||
|
||||
# -- App Launcher --
|
||||
bind=SUPER,D,exec,$app_launcher
|
||||
# SYSTEM
|
||||
# ============================================================================
|
||||
|
||||
# -- Hyprland --
|
||||
bind=SUPER,Q,killactive,
|
||||
bind=CTRLALT,Delete,exit,
|
||||
bind=SUPER,F,fullscreen,
|
||||
bind=SUPER,Space,togglefloating,
|
||||
bind=SUPER,S,pseudo,
|
||||
# - Drag modifier
|
||||
# BIND MOD KEY DISPATCHER
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
# -- Misc --
|
||||
bind=SUPER,N,exec,nm-connection-editor # need install network-manager-applet
|
||||
bind=CTRLALT,L,exec,hyprlock
|
||||
bind=SUPERSHIFT,X,exec,wlogout
|
||||
# - System
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod, q, killactive # kill window
|
||||
|
||||
# -- Some nice mouse binds --
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
# - Terminal
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod, Return, exec, foot
|
||||
bind = $mod SHIFT, Return, exec, alacritty
|
||||
bind = $mod, d, exec, anyrun
|
||||
|
||||
# -- Function keys --
|
||||
# bind=,XF86MonBrightnessUp,exec,brightnessctl set 5%+
|
||||
# bind=,XF86MonBrightnessDown,exec, brightnessctl set 5%-
|
||||
#
|
||||
# - Hardware control
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
# https://wiki.archlinux.org/title/WirePlumber
|
||||
bind=,XF86AudioRaiseVolume,exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+
|
||||
bind=,XF86AudioLowerVolume,exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-
|
||||
bind=,XF86AudioMute,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bind=,XF86AudioMicMute,exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
bind = , XF86Search, exec, anyrun
|
||||
bind = , XF86PowerOff, exec, shutdown -h now
|
||||
|
||||
# WORKSPACES
|
||||
# ============================================================================
|
||||
|
||||
# - Switch to workspace
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod, 1, workspace, 1
|
||||
bind = $mod, 2, workspace, 2
|
||||
bind = $mod, 3, workspace, 3
|
||||
bind = $mod, 4, workspace, 4
|
||||
bind = $mod, 5, workspace, 5
|
||||
bind = $mod, 6, workspace, 6
|
||||
bind = $mod, 7, workspace, 7
|
||||
bind = $mod, 8, workspace, 8
|
||||
bind = $mod, 9, workspace, 9
|
||||
bind = $mod, 0, workspace, 10
|
||||
|
||||
# - Move focussed window to workspace
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mod, mouse_down, workspace, e+1
|
||||
bind = $mod, mouse_up, workspace, e-1
|
||||
|
||||
|
||||
# Window
|
||||
# ============================================================================
|
||||
|
||||
# Move Window
|
||||
bind = $mod SHIFT, left, movewindow, l
|
||||
bind = $mod SHIFT, right, movewindow, r
|
||||
bind = $mod SHIFT, up, movewindow, u
|
||||
bind = $mod SHIFT, down, movewindow, d
|
||||
|
||||
# Focus Window
|
||||
bind = $mod, left, movefocus, l
|
||||
bind = $mod, right, movefocus, r
|
||||
bind = $mod, up, movefocus, u
|
||||
bind = $mod, down, movefocus, d
|
||||
|
||||
# Resize Window
|
||||
bind = $mod CTRL, left, resizeactive, -20 0
|
||||
bind = $mod CTRL, right, resizeactive, 20 0
|
||||
bind = $mod CTRL, up, resizeactive, 0 -20
|
||||
bind = $mod CTRL, down, resizeactive, 0 20
|
||||
|
||||
# MODES
|
||||
# ============================================================================
|
||||
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod SHIFT, d, submap, mode_displays
|
||||
bind = $mod SHIFT, a, submap, mode_move
|
||||
bind = $mod , r, submap, mode_resize
|
||||
bind = $mod SHIFT, s, submap, mode_screenshot
|
||||
bind = $mod SHIFT, e, submap, mode_shutdown
|
||||
|
||||
# LAYOUT
|
||||
# ============================================================================
|
||||
|
||||
# ## Action // Toggle floating ##
|
||||
bind = $mod, space, togglefloating
|
||||
|
||||
# ## Action // Toggle fullscreen ##
|
||||
bind = $mod, f, fullscreen
|
||||
|
||||
# ## Action // Toggle fullscreen across all monitors##
|
||||
# WIP: https://github.com/hyprwm/Hyprland/issues/1660
|
||||
# bind = $mod SHIFT, f, fullscreen global
|
||||
|
||||
# ## Setting // Split windows horizontally ##
|
||||
# bind = $mod, b, splith
|
||||
|
||||
# ## Setting // Split windows vertically ##
|
||||
# bind = $mod, v, splitv
|
||||
|
||||
# ## Action // Switch to window stacking ##
|
||||
# bind = $mod, s, layout stacking
|
||||
|
||||
# ## Action // Switch to window tabbing ##
|
||||
# bind = $mod, w, layout tabbed
|
||||
|
||||
# ## Action // Toggle window splitting ##
|
||||
# bind = $mod, e, layout toggle split
|
||||
|
||||
# ## Navigation // Toggle focus between tiling and floating ##
|
||||
# bind = $mod, space, focus mode_toggle
|
||||
|
||||
# ## Navigation // Swap focus to the parent window ##
|
||||
# bind = $mod, a, focus parent
|
||||
|
||||
|
||||
# Misc
|
||||
# ============================================================================
|
||||
|
||||
# -- Screenshots --
|
||||
bind=,Print,exec,hyprshot -m output -o ~/Pictures/Screenshots -- imv
|
||||
bind=SUPER,Print,exec,hyprshot -m window -o ~/Pictures/Screenshots -- imv
|
||||
bind=CTRL,Print,exec,flameshot gui --raw -p ~/Pictures/Screenshots | wl-copy
|
||||
|
||||
# Focus
|
||||
bind=SUPER,left,movefocus,l
|
||||
bind=SUPER,right,movefocus,r
|
||||
bind=SUPER,up,movefocus,u
|
||||
bind=SUPER,down,movefocus,d
|
||||
|
||||
# Move
|
||||
bind=SUPERSHIFT,left,movewindow,l
|
||||
bind=SUPERSHIFT,right,movewindow,r
|
||||
bind=SUPERSHIFT,up,movewindow,u
|
||||
bind=SUPERSHIFT,down,movewindow,d
|
||||
|
||||
# Resize
|
||||
bind=SUPERCTRL,left,resizeactive,-20 0
|
||||
bind=SUPERCTRL,right,resizeactive,20 0
|
||||
bind=SUPERCTRL,up,resizeactive,0 -20
|
||||
bind=SUPERCTRL,down,resizeactive,0 20
|
||||
|
||||
# Workspaces
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
|
||||
# Send to Workspaces
|
||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e+1
|
||||
bind=SUPER,mouse_up,workspace,e-1
|
||||
|
||||
bind = , Print, exec, hyprshot -m output -o ~/Pictures/Screenshots -- imv
|
||||
bind = $mod, Print, exec, hyprshot -m window -o ~/Pictures/Screenshots -- imv
|
||||
bind = CTRL, Print, exec, flameshot gui --raw -p ~/Pictures/Screenshots | wl-copy
|
||||
|
||||
bind = CTRL ALT, l, exec, hyprlock
|
||||
bind = $mod SHIFT, x, exec, wlogout
|
||||
bind = $mod, n, exec, nm-connection-editor # need install network-manager-applet
|
||||
|
||||
Reference in New Issue
Block a user