Files
dotfiles/common/hypr/hyprland.conf
T
2026-10-22 09:21:55 -04:00

289 lines
11 KiB
Plaintext

# Border colors come from wallust via hyprctl (see bin/hypr_refresh), not a
# sourced file: a changed sourced file triggers a config reload, which leaks
# DRM mode blobs and slows the compositor over days.
exec-once = hyprctl --batch "$(cat ~/.cache/wallust/hyprland-colors.batch)"
# Host layer, part 1 of 2 — must come BEFORE any use of $browser or the
# monitor/env keywords. Hyprland resolves variables in file order, so a
# single source at the bottom would leave $browser undefined at its first
# use (the $mainMod+B bind).
source = ~/.config/hypr/local-env.conf
################
### MONITORS ###
################
# See https://wiki.hypr.land/Configuring/Monitors/
# Layout lives in ~/.config/kanshi/config. This is a fallback
###################
### MY PROGRAMS ###
###################
# Set programs that you use
$terminal = kitty
$menu = wofi --show drun
#############################
### ENVIRONMENT VARIABLES ###
#############################
#####################
### LOOK AND FEEL ###
#####################
general {
border_size = 2
resize_on_border = true
allow_tearing = false
layout = master
}
decoration {
rounding = 10
rounding_power = 2
active_opacity = 1.0
inactive_opacity = 0.95
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
blur {
enabled = true
size = 5
passes = 1
vibrancy = 0.1696
}
}
animations {
enabled = yes, please :)
# Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
# NAME, X0, Y0, X1, Y1
bezier = easeOutQuint, 0.23, 1, 0.32, 1
bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
bezier = linear, 0, 0, 1, 1
bezier = almostLinear, 0.5, 0.5, 0.75, 1
bezier = quick, 0.15, 0, 0.1, 1
# Default animations, see https://wiki.hypr.land/Configuring/Animations/
# NAME, ONOFF, SPEED, CURVE, [STYLE]
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
animation = zoomFactor, 1, 7, quick
}
# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
workspace = special:juliaSpace, gapsout:200
workspace = special:musicPlayer, gapsout:200
workspace = special:kittySpace, gapsout:200
workspace = 1, gapsout:10, gapsin:5
workspace = 1, layoutopt:orientation:bottom
# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
dwindle {
# No pseudotile here: removed in Hyprland 0.55 (system76) and already
# the default on 0.54 (the work laptop), so setting it only produces a
# config error on the newer machine.
preserve_split = true
}
# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
master {
new_status = slave
orientation = top
mfact = 0.7
}
# https://wiki.hypr.land/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
}
# https://wiki.hypr.land/Configuring/Variables/#xwayland
#############
### INPUT ###
#############
# https://wiki.hypr.land/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
repeat_rate = 70
repeat_delay = 250
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# See https://wiki.hypr.land/Configuring/Gestures
gesture = 3, horizontal, workspace
###################
### KEYBINDINGS ###
###################
# See https://wiki.hypr.land/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, Q, killactive,
bind = $mainMod, T, togglefloating,
bind = $mainMod, F, fullscreen,
bind = $mainMod, B, exec, $browser
bind = $mainMod, W, exec, networkmanager_dmenu
bind = $mainMod, N, exec, swaync-client -t -sw
bind = $mainMod, M, exec, udiskie-dmenu
bind = $mainMod, A, exec, $bin/hypr_workspace "juliaSpace" "kitty --title 'juliaSpace' -e julia"
bind = $mainMod, S, exec, $bin/hypr_workspace "musicPlayer" "kitty --title 'musicPlayer' -e ncmpcpp"
bind = $mainMod, P, exec, grimblast copysave area /tmp/screenshot.png
bind = $mainMod SHIFT, N, exec, swaync-client -d -sw
bind = $mainMod SHIFT, P, exec, swayimg --class "custom_screenshot" /tmp/screenshot.png
bind = $mainMod SHIFT, Return, exec, $menu
bind = $mainMod SHIFT, Q, exit
bind = $mainMod CTRL, L, exec, hyprlock
bind = $mainMod CTRL, Return, exec, $bin/hypr_workspace "kittySpace" "kitty --title 'kittySpace'"
bind = $mainMod, V, exec, $bin/scrollburst.sh
# Master layout specific binds
bind = $mainMod, Space, layoutmsg, swapwithmaster
bind = $mainMod, Y, layoutmsg, addmaster
bind = $mainMod, U, layoutmsg, removemaster
bind = $mainMod, I, exec, ~/.config/hypr/toggleFloating.sh
bind = $mainMod, O, layoutmsg, orientationnext
# 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
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Move entire workspace to a different monitor
bind = $mainMod SHIFT ALT CTRL, right, movecurrentworkspacetomonitor, +1
bind = $mainMod SHIFT ALT CTRL, left, movecurrentworkspacetomonitor, -1
bind = $mainMod SHIFT ALT CTRL, l, movecurrentworkspacetomonitor, +1
bind = $mainMod SHIFT ALT CTRL, h, movecurrentworkspacetomonitor, -1
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, mouse:274, exec, $bin/kitty_padding_toggle
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# 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
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
windowrule = match:title juliaSpace, workspace special:juliaSpace
windowrule = match:title musicPlayer, workspace special:musicPlayer
windowrule = match:title playlistBuilder, workspace special:playlistBuilder
windowrule = match:title kittySpace, workspace special:kittySpace
windowrule = match:title rbw_floater, float on, center (monitor_w*0.5) (monitor_h*0.5), size (monitor_w*0.5) (monitor_h*0.5)
windowrule = match:class custom.screenshot, float on
windowrule = match:class Element, float on, center (monitor_w*0.5) (monitor_h*0.5), size (monitor_w*0.75) (monitor_h*0.75)
windowrule = match:class discord, float on, center (monitor_w*0.5) (monitor_h*0.5), size (monitor_w*0.75) (monitor_h*0.75)
# Ignore maximize requests from apps. You'll probably like this.
windowrule = match:class .*, suppress_event maximize
# Fix some dragging issues with XWayland
windowrule = match:class ^$, match:title ^$ match:xwayland true, match:float true, match:fullscreen false, match:pin false nofocus
#################
### AUTOSTART ###
#################
exec-once = hyprctl setcursor capitaine-cursors-light 36
exec-once = waybar
exec-once = awww-daemon
exec-once = swaync
exec-once = [workspace special:juliaSpace silent] $terminal --title "juliaSpace" -e julia
exec-once = [workspace special:musicPlayer silent] $terminal --title "musicPlayer" -e ncmpcpp
exec-once = [workspace special:kittySpace silent] $terminal --title "kittySpace"
exec-once = [workspace 1] $terminal -o "window_padding_width=0" --session ~/.local/share/kitty_htop
exec-once = [workspace 1] $browser
exec-once = [workspace 2] $terminal
exec-once = hypridle
exec-once = systemctl --user restart kanshi.service
# ---------------------------------------------------------------------------
# Host layer, part 2 of 2 — gaps, xwayland, machine-specific binds.
# Anything that must be defined before use belongs in local-env.conf instead.
# ---------------------------------------------------------------------------
source = ~/.config/hypr/local.conf