commit 9ba692fe10bf26ff190c20d51d65128454926161 Author: Harrison DiAmbrosio Date: Sat Feb 7 14:06:58 2026 -0500 this is the real initial commit, batman diff --git a/2 b/2 new file mode 100644 index 0000000..75b8c86 --- /dev/null +++ b/2 @@ -0,0 +1,3 @@ +# master.mez + +master.mez is meant to be part of the default config of any Mezzaluna install. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d030ef3 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# master.mez + +master.mez is meant to be part of the default config of any [Mezzaluna](https://github.com/MezzalunaWM/Mezzaluna) install. It provides basic window management in the master and stack style, simmilar to default dwm. As of right now, since Mezzaluna is in early development, this plugin does a little more than just managing windows. To be fair though, this is more for seeing how a plugin might work and seeing what would be required of plugin developers, and what they have the freedom to customize. + +There is **NO WAY** to officially install this right now sooooooo, maybe just copy or simlink files where they need to go. Sorry lol. diff --git a/lua/master/builtins.lua b/lua/master/builtins.lua new file mode 100644 index 0000000..731b563 --- /dev/null +++ b/lua/master/builtins.lua @@ -0,0 +1,28 @@ +---Holds the default builtin functions for master +---@module 'builtins" + +local M = {} + +local spawn_terminal = function() + mez.api.spawn("wmenu-run") +end + +local spawn_run_launcher = function() + mez.api.spawn("wmneu-run") +end + +local spawn_background = function() + mez.api.spawn("swaybg -i ~/Images/wallpapers/void/gruv_void.png") +end + +local close_focused = function () + mez.view.close(0) +end + +local close_compositor = function () + mez.api.exit() +end + +local + +return M diff --git a/lua/master/init.lua b/lua/master/init.lua new file mode 100644 index 0000000..b11c6f8 --- /dev/null +++ b/lua/master/init.lua @@ -0,0 +1,46 @@ +---@module 'master' + +---@class Master +---@field default_config MasterConfig +---@field config MasterConfig +---@field state MasterState +---@field builtins MasterBuiltins +local M = {}; + +M.builtins = require("master.builtins") + +---@class MasterConfig +---@field master_ratio number +---@field tag_count number +local default_config = { + master_ratio = 0.5, + tag_count = 5, + applications = { + terminal = "alacritty", + browser = "zen" + }, + binds = { + spawn_terminal = { lhs = { mod = "alt", key = "Return" }, rhs = M.builtins.spawn_terminal }, + spawn_run_launcher = { lhs = { mod = "alt", key = "p" }, rhs = M.builtins.spawn_run_launcher }, + close_focused = { lhs = { mods = "alt|shift", key = "C", rhs = M.builtins.close_focused }, + } +} + +---@class Tag +---@field floating number[] +---@field stack number[] + +---@class MasterState +---@field tag_id number +---@field tags Tag[] +M.state = { + tag_id = 1, + tags = {} +} + +M.setup = function(config) + +end + +return M +