Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make APIs better #271

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Make APIs better #271

wants to merge 15 commits into from

Conversation

Ottatop
Copy link
Collaborator

@Ottatop Ottatop commented Dec 31, 2024

Well my right middle finger's knuckle is still sore from no-lifeing Celeste so I decided to work on this thing instead

This PR is intended to be the big final breaking change to the Lua and Rust APIs until 0.1 is released. As a result, this PR is going to be way too big and cover the following aspects:

  • Update the protobuf from proto2 to proto3
  • Better window rule API
  • Better layout API
    • Not a fan of how the client is expected to calculate its own rects for layouting; this means I have to duplicate all the logic over Lua and Rust, and it doesn't support resizing tiles
    • Something compositor-side is gonna be needed
    • Alternatively push this off to some future update
  • Better output management API, or simply remove the current one and direct you to something like kanshi until I can figure something out
  • Better process API
    • Better spawning API for Rust that mirrors std::process::Command
    • Something akin to awful.spawn.once so you can spawn things on startup, close them, and not have them respawn on config reload
  • Better libinput API
  • Better key- and mousebind API
  • Hide the snowcap API until it's actually somewhat stable
  • Probably a bunch of other things
  • And try to fix all the FIXMEs you left everywhere
  • And update the config gen cli
  • And remember to do that "let xwayland scale itself" thing pushing off to later

Side note: I regret deciding to do a Rust API because wow is it not fun to try to design something remotely ergonomic haha nvm this is kinda fun

Edit: hey past me it's present me here to tell you to:

  • Add docs for the move from metaconfig.toml to pinnacle.toml
  • Add docs for the new input API
  • Oh and do this all again for the Lua side 👍

Also took the time to make signalling version agnostic internally so I'm not importing API definitions outside of the signal api file
Now with release binds and bind modes!
It's not that ergonomic and you can use signals to achieve the same thing. Also kanshi exists
Is now imperative and you use the same methods on windows as everywhere else
Removes the re-export of the snowcap api because it's not stable
And remove old proto api defs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant