mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-13 08:01:05 +01:00
Add comments
This commit is contained in:
parent
8c054e17ba
commit
5193082cf5
3 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
|||
-- Just like in Awesome, if you want access to Luarocks packages, this needs to be called.
|
||||
-- NOTE: The loader doesn't load from the local Luarocks directory (probably in ~/.luarocks),
|
||||
-- | so if you have any rocks installed with --local,
|
||||
-- | you may need to add those paths to package.path and package.cpath.
|
||||
-- Alternatively, you can add
|
||||
-- eval $(luarocks path --bin)
|
||||
-- to your shell's startup script to permanently have access to Luarocks in all your Lua files.
|
||||
pcall(require, "luarocks.loader")
|
||||
|
||||
-- Neovim users be like:
|
||||
require("pinnacle").setup(function(pinnacle)
|
||||
local input = pinnacle.input --Key and mouse binds
|
||||
local client = pinnacle.client --Window management
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local M = {
|
||||
local input = {
|
||||
keys = require("keys"),
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ local M = {
|
|||
---@param key Keys The key for the keybind. NOTE: uppercase and lowercase characters are considered different.
|
||||
---@param modifiers Modifiers[] Which modifiers need to be pressed for the keybind to trigger.
|
||||
---@param action fun() What to run.
|
||||
function M.keybind(modifiers, key, action)
|
||||
function input.keybind(modifiers, key, action)
|
||||
table.insert(CallbackTable, action)
|
||||
SendMsg({
|
||||
SetKeybind = {
|
||||
|
@ -17,4 +17,4 @@ function M.keybind(modifiers, key, action)
|
|||
})
|
||||
end
|
||||
|
||||
return M
|
||||
return input
|
||||
|
|
|
@ -40,9 +40,15 @@ local function read_exact(socket_fd, count)
|
|||
end
|
||||
|
||||
---@class Pinnacle
|
||||
---The main Pinnacle table, where all of the config options come from.
|
||||
---
|
||||
---While you *can* import the fields directly, all config must be in the `setup` function, so you might as well just use the provided table. The ability to directly `require` fields may be dropped in the future.
|
||||
local pinnacle = {
|
||||
---Key and mouse binds
|
||||
input = require("input"),
|
||||
---Window management
|
||||
client = require("client"),
|
||||
---Process spawning
|
||||
process = require("process"),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue