Overview
Hyprland is the core Wayland compositor for the Kanagawa setup. The configuration follows a modular structure with separate files for different aspects like keybindings, animations, colors, and monitors.
The main configuration file sources several modules, making it easy to customize individual aspects without touching the core config.
Configuration Structure
The Hyprland configuration is split into multiple files for better organization:
~ /.config/hypr/
├── hyprland.conf # Main configuration file
├── keybindings.conf # All keyboard shortcuts
├── animations.conf # Animation settings
├── colors/colors.conf # Color scheme
├── monitors.conf # Monitor configuration
└── autostart.conf # Startup programs
Main Configuration
The main hyprland.conf file sources all modules and defines the core compositor settings:
source = ./colors/colors.conf # Color scheme
source = ./monitors.conf # Monitor configuration
source = ./keybindings.conf # Keyboard shortcuts
source = ./animations.conf # Animation settings
source = ./autostart.conf # Programs to autostart
Environment Variables
Hyprland sets up several environment variables for optimal compatibility:
# NVIDIA specific
env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# Wayland support
env = ELECTRON_OZONE_PLATFORM_HINT,auto
env = ELECTRON_ENABLE_WAYLAND,1
env = NIXOS_OZONE_WL,1
# Cursor configuration
env = XCURSOR_SIZE,24
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
env = HYPRCURSOR_SIZE,30
General Settings
Decoration
Input
General Configuration general {
gaps_in = 4
gaps_out = 4
border_size = 1
col.active_border = rgb($blue)
col.inactive_border = rgb($grey0)
resize_on_border = false
allow_tearing = false
layout = dwindle
}
The general block controls window gaps, borders, and layout behavior. Window Decoration decoration {
rounding = 20
active_opacity = 0.95
inactive_opacity = 0.90
shadow {
enabled = true
range = 4
render_power = 3
color = rgb($bg0)
}
blur {
enabled = true
size = 10
ignore_opacity = true
noise = 0.08
contrast = 1.5
brightness = 0.8
xray = false
new_optimizations = true
}
}
Features include rounded corners (20px), transparency, shadows, and optimized blur effects. input {
kb_layout = es
follow_mouse = 1
sensitivity = 0
touchpad {
natural_scroll = true
}
}
gestures {
gesture = 3, horizontal, workspace
}
Configured for Spanish keyboard layout with natural touchpad scrolling and three-finger workspace gestures.
Window Rules
Custom opacity rules for specific applications:
windowrule = opacity 0.95 0.85, match:class codium
windowrule = opacity 1 1, match:class brave-browser
VSCodium Semi-transparent (95% active, 85% inactive)
Brave Browser Fully opaque (no transparency)
Layouts
Dwindle Layout
dwindle {
pseudotile = true
preserve_split = true
}
The dwindle layout creates a binary tree structure for window tiling.
Master Layout
master {
new_status = master
}
Alternative layout where new windows become the master window.
Workspace Rules
You can enable “smart gaps” to remove gaps when only one window is present: workspace = w[tv1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
These rules are commented out by default but can be enabled for a cleaner look with single windows.
Miscellaneous Settings
misc {
force_default_wallpaper = -1
disable_hyprland_logo = true
}
The force_default_wallpaper = -1 setting uses random wallpapers. Set to 0 to disable the anime mascot wallpapers.
Key Features
Transparency Window transparency with blur effects for a modern aesthetic
Rounded Corners 20px rounded corners on all windows
Smart Shadows Subtle shadows with optimized rendering
Gesture Support Three-finger horizontal swipe for workspace switching
Next Steps
Keybindings Learn about all keyboard shortcuts
Waybar Configure the status bar