Find a file
2023-06-28 16:41:36 -05:00
.github/workflows Move tag file 2023-06-25 19:12:48 -05:00
api/lua Add types, add missing MPL header that I skipped the check for 2023-06-26 21:19:02 -05:00
assets See if README image works 2023-06-20 13:52:50 -05:00
resources Merged crates, more work on api 2023-06-17 18:55:04 -05:00
src Raise fd limit, extract spawn handling into own fn 2023-06-28 16:41:36 -05:00
.gitignore Initial commit 2023-05-28 19:10:42 -05:00
Cargo.toml Add SPDX identifiers 2023-06-25 17:49:06 -05:00
LICENSE Initial commit 2023-05-28 19:10:42 -05:00
README.md Add stuff 2023-06-24 17:39:40 -05:00
rustfmt.toml First commit 2023-05-28 19:18:22 -05:00

Pinnacle

Cool logo
A very, VERY WIP Smithay-based wayland compositor

Info

Why Pinnacle?

Well, I currently use Awesome. And I really like it! Unfortunately, Awesome doesn't exist for Wayland (anymore). There doesn't seem to be any Wayland compositor out there that has all of the following:

  • Tags for window management
  • Configurable in Lua (or any other programming language for that matter)
  • Has a bunch of batteries included (widget system, systray, etc)

So, this is my attempt at making an Awesome-esque Wayland compositor.

Dependencies

You'll need the following packages, as specified by Smithay:

libwayland
libxkbcommon
libudev
libinput
libgdm
libseat

Package names will vary across distros. TODO: list those names.

Building

Build the project with:

cargo build [--release]

Running

After building, run the executable located in either:

./target/debug/pinnacle --<backend>     // without --release
./target/release/pinnacle --<backend>   // with --release

Or, run the project directly with

cargo run [--release] -- --<backend>

backend can be one of two values:

  • winit: run Pinnacle as a window in your graphical environment
  • udev: run Pinnacle in a tty. NOTE: I tried running udev in Awesome and some things broke so uh, don't do that

Configuration

Please note: this is VERY WIP and has basically no options yet.

Pinnacle supports configuration through Lua (and hopefully more languages if I architect it correctly 🦀).

Run Pinnacle with the PINNACLE_CONFIG environment variable set to the path of your config file. If not specified, Pinnacle will look for the following:

$XDG_CONFIG_HOME/pinnacle/init.lua
~/.config/pinnacle/init.lua         // if XDG_CONFIG_HOME isn't set

The following will use the example config file in api/lua:

PINNACLE_CONFIG="./api/lua/example_config.lua" cargo run -- --<backend>

Autocomplete and that cool stuff

It is highly recommended to use the Lua language server and set it up to have the api/lua directory as a library, as I'll be using its doc comments to provide autocomplete and error checking.

For VS Code:

Install the Lua plugin, then go into its settings and add the absolute(?) path to the api/lua directory to Workspace: Library.

For Neovim:

Pass this table into your Lua language server settings:

Lua = {
    workspace = {
        library = {
            "/path/to/pinnacle/api/lua"
        }
    }
}

Doc website soon™️

Controls

The following controls are currently hardcoded:

  • Ctrl + Left Mouse: Move a window
  • Ctrl + Right Mouse: Resize a window

You can find the rest of the controls in the example_config.