Class Pinnacle
The entry point to configuration.
This module contains the setup
function, which is how you'll access all the ways to configure Pinnacle.
Fields
input
input
: Input
= require("pinnacle.input")
tag
tag
: Tag
= require("pinnacle.tag")
output
output
: Output
= require("pinnacle.output")
window
window
: Window
= require("pinnacle.window")
process
process
: Process
= require("pinnacle.process")
util
util
: Util
= require("pinnacle.util")
layout
layout
: Layout
= require("pinnacle.layout")
render
render
: Render
= require("pinnacle.render")
snowcap
snowcap
: pinnacle.Snowcap
= nil
Functions
function quit
function Pinnacle.quit()
Quit Pinnacle.
function reload_config
function Pinnacle.reload_config()
Reload the active config.
function backend
function Pinnacle.backend()
-> "tty" | "window"
Gets the currently running backend.
Returns
"tty" | "window"
-"tty"
if Pinnacle is running in a tty, or"window"
if it's running in a nested window
function init
function Pinnacle.init()
Initializes the protobuf backend and connects to Pinnacle's gRPC socket.
If the Snowcap Lua API is installed and Snowcap is running, this will also setup Snowcap and connect to its socket as well.
function setup
function Pinnacle.setup(config_fn: fun(pinnacle: Pinnacle))
Setup a Pinnacle config.
You must pass in a function that takes in the Pinnacle
table. This table is how you'll access the other config modules.
You can also require
the other modules. Just be sure not to call any of their functions outside this setup function.
If you want to run a function with the config without blocking at the end, see Pinnacle.run
.
Parameters
config_fn
: fun(pinnacle: Pinnacle)
See also
function run
function Pinnacle.run(run_fn: fun(pinnacle: Pinnacle))
Run a function with the Pinnacle API.
If you are writing a config, use Pinnacle.setup
instead.
Like Pinnacle.setup
, this function takes in a function that takes in the Pinnacle
table. This allows you to run anything that setup
can run.
Unlike setup
, this will not listen to the compositor for incoming key presses, signals, and the like. This means that this function will not block and can be used to integrate with external applications like taskbars and widget systems like eww, but it will not allow you to set usable keybinds or call signal callbacks. This is useful for things like querying compositor information for outputs and windows.
Parameters
run_fn
: fun(pinnacle: Pinnacle)