mirror of
https://github.com/MezzalunaWM/master.mez.git
synced 2026-03-07 20:19:53 -05:00
this is the real initial commit, batman
This commit is contained in:
commit
9ba692fe10
4 changed files with 82 additions and 0 deletions
3
2
Normal file
3
2
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# master.mez
|
||||
|
||||
master.mez is meant to be part of the default config of any Mezzaluna install.
|
||||
5
README.md
Normal file
5
README.md
Normal file
|
|
@ -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.
|
||||
28
lua/master/builtins.lua
Normal file
28
lua/master/builtins.lua
Normal 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
46
lua/master/init.lua
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue