Lua-based Hyprland plugin infrastructure share&discussion #15145
AbaoFromCUG
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been experimenting with a Lua-based plugin workflow for Hyprland.
hipe.hypr- the lua plugin manager of hyprlandThe main piece is hipe.hypr, a small plugin manager inspired by
lazy.nvim. It lets users describe Hyprland Lua plugins in a Lua spec, then handles cloning, local dev overrides, dependency ordering,package.pathsetup, config callbacks, keybind registration, optional LuaRocks dependencies, and evenhyprpmplugins.Example:
hipe.hyprsupport lua development workflow, support lsp settings, e.g. neovim:lua-plugin-template.hypr- a template project and starting point for lua plugin developmentI also made lua-plugin-template.hypr as the recommended starting point for writing plugins managed by hipe. The convention is intentionally simple:
The template is meant to make a plugin feel like a normal Lua module: expose
setup(), expose public functions for keybinds, keep implementation code in submodules, and test it withmake test.virtual-desktops.hypra real practice of lua pluginThe first real plugin I am building on top of this is virtual-desktops.hypr, a lua-rewrite plugin of hyprland-virtual-desktops.
virtual-desktops.hyprserves both as a useful plugin and as a test case for the workflow.The goal is not to replace native Hyprland plugins. I want a lighter path for plugins where the native side stays small, while behavior, configuration, and user extension points can live in Lua.
Some feedback and suggestions(maybe)
I would like feedback on:
set_workspacehyprctl replcould output ANSI escape sequences, which would make unit test output nicer with colorsnvim -l xxx.luaIf this direction makes sense, I would also be happy to work with the Hyprland maintainers on building the related ecosystem together.
Beta Was this translation helpful? Give feedback.
All reactions