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

Add Github action to create + update SpoonInstall compatible branch #45

Merged
merged 1 commit into from
May 21, 2024

Conversation

ChrisW-B
Copy link

First, thank you so much for making this! I've been missing PaperWM/Niri style management in MacOS, and this is a really great solution

When I was installing it I noticed that there didn't seem to be a way to use the SpoonInstall spoon, which asks for a very specific file structure. This should add a Github action that will let someone setup and install using SpoonInstall, as an alternative for cloning into the ~/.hammerspoon/Spoons directory.

It works by zipping the init.lua file into a new Spoons folder, and then force pushing to another branch with the zipped file- hopefully this means that branch needs as little manual maintenance as possible.

With this setup, it should be as simple as installing SpoonInstall, and making your init.lua along the lines of:

hs.loadSpoon("SpoonInstall")

spoon.SpoonInstall.repos.PaperWM = {
    url = "https://github.com/mogenson/PaperWM.spoon",
    desc = "PaperWM.spoon repository",
    branch = "release",
}

spoon.SpoonInstall:andUse("PaperWM", {
    repo = "PaperWM",
    config = { screen_margin = 16, window_gap = 2 },
    start = true,
    hotkeys = {
		...
    }
})

with this, the next time you reload your config, SpoonInstall should download and start PaperWM.

The docs/docs.json file is pretty much the minimum required info; I haven't looked into what kind of useful things you could put in there yet.

Let me know if you have any concerns/would rather do it an alternate way (or just would rather not support SpoonInstall!) If this works for you, I can also update the readme, I just wouldn't do it before this works the way you'd prefer.

@mogenson
Copy link
Owner

Thanks for submitting this! I wasn't aware of SpoonInstall until now. Let me look into SpoonInstall, try out this PR, and I'll get back to you in a day or so.

@mogenson
Copy link
Owner

Looks good. Excited to try it out!

@mogenson mogenson merged commit 20974d2 into mogenson:main May 21, 2024
1 check passed
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.

2 participants