mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
what is this stupid test i added, im going to bed
This commit is contained in:
parent
a764be6af6
commit
c8b4606f53
2 changed files with 53 additions and 2 deletions
|
|
@ -93,5 +93,4 @@ pub fn build(b: *std.Build) void {
|
||||||
const run_cmd = b.addRunArtifact(mez);
|
const run_cmd = b.addRunArtifact(mez);
|
||||||
run_step.dependOn(&run_cmd.step);
|
run_step.dependOn(&run_cmd.step);
|
||||||
run_cmd.step.dependOn(b.getInstallStep());
|
run_cmd.step.dependOn(b.getInstallStep());
|
||||||
run_cmd.addArg("alacritty");
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,58 @@ end
|
||||||
mez.path.config = mez.fs.joinpath(env_conf, "mez", "init.lua")
|
mez.path.config = mez.fs.joinpath(env_conf, "mez", "init.lua")
|
||||||
package.path = package.path..";"..mez.fs.joinpath(env_conf, "mez", "lua", "?.lua")
|
package.path = package.path..";"..mez.fs.joinpath(env_conf, "mez", "lua", "?.lua")
|
||||||
|
|
||||||
|
local test = function()
|
||||||
|
-- View tests
|
||||||
|
mez.api.spawn("alacritty")
|
||||||
|
local focused_view = mez.view.get_focused_id()
|
||||||
|
print(focused_view)
|
||||||
|
|
||||||
|
for i = 0,4 do
|
||||||
|
mez.api.spawn("alacritty")
|
||||||
|
end
|
||||||
|
|
||||||
|
local view_ids = mez.view.get_all_ids()
|
||||||
|
for _, id in ipairs(view_ids) do
|
||||||
|
print(id)
|
||||||
|
mez.view.close(id)
|
||||||
|
end
|
||||||
|
|
||||||
|
print(mez.view.get_title(0))
|
||||||
|
print(mez.view.get_title(focused_view))
|
||||||
|
print(mez.view.get_app_id(0))
|
||||||
|
print(mez.view.get_app_id(focused_view))
|
||||||
|
|
||||||
|
mez.view.set_position(0, 100, 100)
|
||||||
|
mez.view.set_position(focused_view, 200, 200)
|
||||||
|
mez.view.set_size(0, 100, 100)
|
||||||
|
mez.view.set_size(focused_view, 200, 200)
|
||||||
|
|
||||||
|
-- Output tests
|
||||||
|
local focused_output = mez.output.get_focused_id();
|
||||||
|
print(focused_output)
|
||||||
|
|
||||||
|
local output_ids = mez.output.get_all_ids()
|
||||||
|
for _, id in ipairs(output_ids) do
|
||||||
|
print(id)
|
||||||
|
end
|
||||||
|
|
||||||
|
print(mez.output.get_name(0))
|
||||||
|
print(mez.output.get_name(focused_output))
|
||||||
|
print(mez.output.get_description(0))
|
||||||
|
print(mez.output.get_description(focused_output))
|
||||||
|
print(mez.output.get_model(0))
|
||||||
|
print(mez.output.get_model(focused_output))
|
||||||
|
print(mez.output.get_make(0))
|
||||||
|
print(mez.output.get_make(focused_output))
|
||||||
|
print(mez.output.get_serial(0))
|
||||||
|
print(mez.output.get_serial(focused_output))
|
||||||
|
print(mez.output.get_rate(0))
|
||||||
|
print(mez.output.get_rate(focused_output))
|
||||||
|
|
||||||
|
local res = mez.output.get_resolution(0)
|
||||||
|
print(res.width .. ", " .. res.height)
|
||||||
|
end
|
||||||
|
|
||||||
mez.input.add_keymap("alt", "Return", {
|
mez.input.add_keymap("alt", "Return", {
|
||||||
press = function()
|
press = function()
|
||||||
-- foot doesnt resize on uneven columns
|
-- foot doesnt resize on uneven columns
|
||||||
|
|
@ -68,7 +120,7 @@ local tiler = function ()
|
||||||
end
|
end
|
||||||
|
|
||||||
mez.input.add_keymap("alt", "t", {
|
mez.input.add_keymap("alt", "t", {
|
||||||
press = function() tiler() end
|
press = function() test() end
|
||||||
})
|
})
|
||||||
|
|
||||||
mez.hook.add("ViewMapPre", {
|
mez.hook.add("ViewMapPre", {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue