Skip to content

[hypr] migrate to lua - issue #18#23

Merged
sbalghari merged 1 commit into
mainfrom
18-hypr-migrate-to-lua
May 31, 2026
Merged

[hypr] migrate to lua - issue #18#23
sbalghari merged 1 commit into
mainfrom
18-hypr-migrate-to-lua

Conversation

@sbalghari

@sbalghari sbalghari commented May 31, 2026

Copy link
Copy Markdown
Owner

Closes #18

Summary by CodeRabbit

Release Notes

  • Refactor
    • Migrated desktop environment configuration system from conf-based format to Lua scripting for enhanced modularity and maintainability.
    • Reorganized configuration startup procedures with a unified initialization entry point.
    • Updated color generation system to produce both conf and Lua format outputs.
    • Improved input handling structure including gesture-based controls and keybinding organization.

@sbalghari sbalghari linked an issue May 31, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c8e0fc98-7538-4d0b-93c4-1382f229f482

📥 Commits

Reviewing files that changed from the base of the PR and between f497415 and 9e504e2.

📒 Files selected for processing (24)
  • .vscode/settings.json
  • dotfiles/configs/hypr/hyprland.conf
  • dotfiles/configs/hypr/hyprland.lua
  • dotfiles/configs/hypr/hyprland/animation.conf
  • dotfiles/configs/hypr/hyprland/animation.lua
  • dotfiles/configs/hypr/hyprland/decoration.conf
  • dotfiles/configs/hypr/hyprland/decoration.lua
  • dotfiles/configs/hypr/hyprland/enviromentvars.conf
  • dotfiles/configs/hypr/hyprland/enviromentvars.lua
  • dotfiles/configs/hypr/hyprland/general.conf
  • dotfiles/configs/hypr/hyprland/general.lua
  • dotfiles/configs/hypr/hyprland/input.conf
  • dotfiles/configs/hypr/hyprland/input.lua
  • dotfiles/configs/hypr/hyprland/keybindings.conf
  • dotfiles/configs/hypr/hyprland/keybindings.lua
  • dotfiles/configs/hypr/hyprland/misc.conf
  • dotfiles/configs/hypr/hyprland/misc.lua
  • dotfiles/configs/hypr/hyprland/monitor.conf
  • dotfiles/configs/hypr/hyprland/monitor.lua
  • dotfiles/configs/hypr/hyprland/windowrules.conf
  • dotfiles/configs/hypr/hyprland/windowrules.lua
  • dotfiles/configs/hypr/scripts/toggle_floating.sh
  • dotfiles/configs/matugen/config.toml
  • dotfiles/configs/matugen/templates/hyprland.lua

📝 Walkthrough

Walkthrough

This PR completes a migration of Hyprland window manager configuration from the legacy .conf format to Lua-based configuration. The old .conf files are removed, and new .lua modules provide equivalent functionality organized as a Lua entry point that requires sub-modules and registers startup handlers.

Changes

Hyprland Lua Configuration Migration

Layer / File(s) Summary
Lua tooling and configuration entry point
.vscode/settings.json, dotfiles/configs/hypr/hyprland.lua
VS Code language server stubs configured for Hyprland Lua development. New hyprland.lua entry point requires all sub-configuration modules and registers hl.on("hyprland.start") handler to execute startup commands (Waybar, systemd services, clipboard, file manager daemon, wallpaper, notifications).
Foundational configuration modules
dotfiles/configs/hypr/hyprland/enviromentvars.lua, dotfiles/configs/hypr/hyprland/animation.lua, dotfiles/configs/hypr/hyprland/decoration.lua, dotfiles/configs/hypr/hyprland/general.lua, dotfiles/configs/hypr/hyprland/monitor.lua
Environment variables configure cursor theme, XDG session identifiers, Wayland-first GTK/GDK/Clutter backends, and Qt Wayland platform overrides. Animation module defines easing curves and animation leaf definitions for windows, borders, layers, workspaces, and zoom. Decoration sets rounding, opacity, blur, and shadow with color bindings. General configuration defines workspace gaps, border sizing/colors, layout selection, and snap behavior. Monitor sets resolution/position/transform for output.
Input handling and keybindings
dotfiles/configs/hypr/hyprland/input.lua, dotfiles/configs/hypr/hyprland/keybindings.lua
Input configuration sets keyboard layout to US, enables mouse-follow focus, adjusts scrolling/touchpad behavior, and registers a three-finger horizontal gesture to switch workspaces. Keybindings define window control (close, floating, fullscreen), focus/workspace navigation, numeric-key workspace binding loop, mouse drag/resize, audio volume/mute/brightness/LCD adjustment with notifications, and media player controls via playerctl.
Window management and miscellaneous behavior
dotfiles/configs/hypr/hyprland/windowrules.lua, dotfiles/configs/hypr/hyprland/misc.lua
Window rules define applet floating with monitor-relative positioning, general application floating with centering, file-dialog floating and sizing, and XWayland drag-fix rules; suppress maximize requests globally. Miscellaneous settings configure wallpaper/logo defaults, font family, workspace cycling, cursor theme syncing, dwindle split preservation, and master layout display.
Color theme generation and template integration
dotfiles/configs/matugen/config.toml, dotfiles/configs/matugen/templates/hyprland.lua
Matugen template configuration split into hyprlandConf and hyprlandLua sections for separate .conf and .lua color outputs. New Lua template generates configuration table with image path and hex-formatted color entries from matugen's color collection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • sbalghari/sbdots#19: Adds the Matugen execution and wiring code that generates and applies the Hyprland color templates introduced by this PR's template updates.

Poem

🐰 From configs once in .conf form we leap,
To Lua's shores where elegance runs deep,
Each module loads, each keybind takes its place,
The Hyprland setup now shows Lua's grace.
With colors flowing and animations bright,
A rabbit's window manager done just right! 🌙✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 18-hypr-migrate-to-lua

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sbalghari sbalghari merged commit a3caef3 into main May 31, 2026
1 of 2 checks passed
@sbalghari sbalghari deleted the 18-hypr-migrate-to-lua branch May 31, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hypr] migrate to lua

1 participant