Skip to content

Conversation

@gus-costa
Copy link

Implements the --move domain to allow repositioning items relative to other items in SketchyBar.

Related to #11

API

Item method:

item:move("before", reference_item)
item:move("after", reference_item)

Module function:

sbar.move("item_name", "before", "reference_name")

Changes

  • Added move() function in src/sketchybar.c following existing domain patterns
  • Supports both item table references and string names for flexibility
  • Updated README.md with Move Domain documentation and examples
  • Added Lua build artifacts to .gitignore

Example

local calendar = sbar.add("item", "calendar", { label = "📅" })
local clock = sbar.add("item", "clock", { label = "🕐" })

-- Move calendar to appear after clock
calendar:move("after", clock)

Maps to SketchyBar CLI: sketchybar --move <name> before/after <reference>

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