Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 Hyprland Modular Framework

A production-grade, extensible configuration system for Hyprland with declarative theming, profiles, and plugin support.

✨ Features

  • 🎨 Theme Engine - 7 built-in themes (Glassmorphism, Nord, Dracula, Catppuccin, Gruvbox, TokyoNight, Minimal)
  • πŸ‘€ Profile System - Gaming, Work, Development, Streaming, Presentation, Minimal
  • πŸ”Œ Plugin Architecture - First-class support for Hyprland plugins
  • ⌨️ Modular Keybindings - Composable keybinding modules
  • πŸͺŸ Declarative Window Rules - Category-based rule system
  • πŸ”§ Feature Flags - Toggle individual features on/off
  • πŸ“ Type-Safe Options - Full NixOS module type checking

πŸ“ Structure

hyprland-modular/
β”œβ”€β”€ default.nix          # Main module with options
β”œβ”€β”€ lib/
β”‚   └── default.nix      # Helper functions (colors, rules, bindings)
β”œβ”€β”€ themes/
β”‚   └── default.nix      # Theme definitions
β”œβ”€β”€ profiles/
β”‚   └── default.nix      # Usage profiles
β”œβ”€β”€ bindings/
β”‚   └── default.nix      # Keybinding modules
β”œβ”€β”€ rules/
β”‚   └── default.nix      # Window rule categories
β”œβ”€β”€ plugins/
β”‚   └── default.nix      # Plugin system
└── examples.nix         # Usage examples

πŸš€ Quick Start

1. Import the module

# In your home-manager configuration
{ config, pkgs, ... }:

{
  imports = [ ./path/to/hyprland-modular ];
  
  programs.hyprland-modular = {
    enable = true;
    theme = "glassmorphism";
    profile = "default";
  };
}

2. Basic Configuration

programs.hyprland-modular = {
  enable = true;
  
  # Visual theme
  theme = "catppuccin";  # or "nord", "dracula", "gruvbox", etc.
  
  # Usage profile
  profile = "development";  # or "gaming", "work", "minimal"
  
  # Monitor setup
  monitors = [{
    resolution = "1920x1080@144";
    position = "auto";
    scale = 1.0;
  }];
  
  # Input
  input.keyboard.layout = "br";
  input.mouse.accelProfile = "flat";
  
  # Terminal
  terminal.primary = "kitty";
  terminal.multiplexer = "zellij";
};

🎨 Themes

Theme Description
glassmorphism Frosted glass with cyan/violet gradients
nord Arctic, bluish clean aesthetic
dracula Dark with vibrant purple/pink
catppuccin Soothing pastel colors
gruvbox Retro warm colors
tokyonight Clean dark blue theme
minimal No effects, maximum performance

Custom Theme

programs.hyprland-modular = {
  theme = "custom";
  customTheme = {
    name = "my-theme";
    colors = {
      primary = "#ff6b6b";
      secondary = "#4ecdc4";
      background = "#1a1a2e";
      surface = "#16213e";
    };
    opacity = { active = 0.95; inactive = 0.90; };
    blur = { size = 12; passes = 3; };
    rounding = 16;
  };
};

πŸ‘€ Profiles

Profile Use Case Animations Blur VRR
default Everyday use Full Full On
gaming Maximum FPS Minimal Off Fullscreen
work Productivity Moderate Light On
minimal Battery/low-end Off Off Off
presentation Demos Elegant Heavy On
development Coding Balanced Light On
streaming OBS capture Smooth Light Off

πŸ”§ Feature Flags

programs.hyprland-modular.features = {
  blur = true;           # Window blur effects
  animations = true;     # Window animations
  shadows = true;        # Drop shadows
  rounding = true;       # Rounded corners
  vrr = true;            # Variable Refresh Rate
  dimInactive = true;    # Dim unfocused windows
  windowSwallowing = true; # Terminal swallowing
  clipboard = true;      # Clipboard manager (cliphist)
  screenshotTools = true; # grim, slurp, swappy
  idleManagement = true;  # hypridle
  notifications = true;   # mako
};

⌨️ Keybinding Modules

programs.hyprland-modular.keybindings = {
  modules = [ 
    "core"       # Terminal, launcher, kill, exit
    "window"     # Fullscreen, float, focus, move
    "workspace"  # Switch, move to workspace
    "media"      # Volume, brightness, playerctl
    "screenshot" # Print screen variants
    "power"      # Lock, suspend, shutdown
  ];
  
  # Add custom bindings
  extraBinds = [
    "$mainMod, B, exec, firefox"
    "$mainMod SHIFT, B, exec, brave"
  ];
};

Default Keybindings

Keys Action
Super + Return Terminal (with multiplexer)
Super + D App launcher
Super + E File manager
Super + Q Kill window
Super + F Fullscreen
Super + V Toggle floating
Super + 1-0 Switch workspace
Super + Shift + 1-0 Move to workspace
Print Screenshot region to editor
Super + Ctrl + L Lock screen

πŸͺŸ Window Rule Categories

programs.hyprland-modular.windowRules = {
  categories = [
    "development"     # IDEs, terminals, editors
    "browsers"        # Web browsers
    "fileManagers"    # File managers
    "systemUtilities" # pavucontrol, nm-applet, etc.
    "media"           # mpv, vlc, image viewers
    "productivity"    # Obsidian, PDFs, office
    "communication"   # Discord, Slack, Teams
    "dialogs"         # Modal dialogs, auth prompts
    "performance"     # noanim, immediate render
    "gaming"          # Steam, Lutris, games
  ];
  
  # Add custom rules
  extra = [
    "float, class:^(my-app)$"
    "opacity 0.9 0.85, class:^(my-app)$"
  ];
};

πŸ”Œ Plugins

programs.hyprland-modular.plugins = {
  enable = true;
  list = [
    "hyprexpo"         # Workspace overview
    "hyprbars"         # Window title bars
    "borders-plus-plus" # Enhanced borders
  ];
};

Available Plugins

Plugin Description
hyprexpo macOS-like workspace overview
hyprspace Alternative workspace overview
hyprbars Window title bars with buttons
hyprtrails Cursor trail effects
borders-plus-plus Multi-layer borders
csgo-vulkan-fix CS2 Vulkan rendering fix

πŸ–₯️ Multi-Monitor Setup

programs.hyprland-modular.monitors = [
  {
    name = "DP-1";
    resolution = "2560x1440@165";
    position = "0x0";
    scale = 1.0;
    vrr = true;
  }
  {
    name = "HDMI-A-1";
    resolution = "1920x1080@60";
    position = "2560x0";
    scale = 1.0;
    transform = 0;  # 0=normal, 1=90Β°, 2=180Β°, 3=270Β°
  }
];

πŸ”’ Idle & Lock

programs.hyprland-modular.idle = {
  lockTimeout = 300;     # Lock after 5 minutes
  dpmsTimeout = 600;     # Screen off after 10 minutes
  suspendTimeout = 1800; # Suspend after 30 minutes (null = disabled)
};

πŸ› οΈ Advanced: Using the Library

The lib/ module exposes helper functions:

# In your own modules
let
  hyprLib = import ./lib { inherit lib pkgs; };
in {
  # Color utilities
  hyprLib.hexToRgba "#00d4ff" 0.9  # => "rgba(00d4ffe6)"
  hyprLib.gradient [ "#00d4ff" "#7c3aed" ] 45  # => gradient string
  
  # Rule builders
  hyprLib.appRule { class = "firefox"; opacity = 0.98; }
  hyprLib.floatingApp "pavucontrol" 800 500
  hyprLib.dialogRule "Confirm"
  
  # Binding helpers
  hyprLib.mkWorkspaceBinds "$mainMod" 10
  hyprLib.mkDirectionalBinds "$mainMod" "movefocus"
}

πŸ“ Migration from Monolithic Config

  1. Identify your settings: Theme colors, opacity, animations
  2. Choose a base theme: Pick the closest built-in theme
  3. Select a profile: Match your primary use case
  4. Enable/disable features: Use feature flags
  5. Add custom rules: Use windowRules.extra
  6. Add custom binds: Use keybindings.extraBinds

πŸ”„ Escape Hatches

For settings not covered by the options:

programs.hyprland-modular = {
  # Merge into settings
  extraSettings = {
    general.some_option = "value";
  };
  
  # Raw config lines
  extraConfig = ''
    # Raw Hyprland config syntax
    exec-once = my-custom-script
  '';
};

πŸ“œ License

MIT - Feel free to use and modify!

🀝 Contributing

PRs welcome! Areas that could use expansion:

  • More themes
  • More plugins
  • Workspace management options
  • Animation presets

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages