this is the real initial commit, batman

This commit is contained in:
Harrison DiAmbrosio 2026-02-07 14:06:58 -05:00
commit 9ba692fe10
4 changed files with 82 additions and 0 deletions

28
lua/master/builtins.lua Normal file
View file

@ -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

46
lua/master/init.lua Normal file
View file

@ -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