Skip to content

Swiftbar forgets the position of plugins #458

@andyearnshaw

Description

@andyearnshaw

Describe the bug
Whenever I move the menubar icon for my plugin, Swiftbar seems to forget it the next time it opens. However, if I add another plugin and move that, the order of my original plugin appears to be preserved.

To Reproduce
It's easier to reproduce with Streamable plugins.

Steps to reproduce the behavior:

  1. Create streamable plugin using Deno, which outputs an image to the menubar
  2. Relocate the icon in the menubar
  3. Close and reopen Swiftbar
  4. Observe that the icon position has reset

Expected behavior
The position of all plugins should preserve across restarts, disable/enable cycles and refreshes.

Screenshots

Original position (green T):

Image

After restart:

Image

Environment:

  • macOS version: 15.7.1 (24G231)
  • SwiftBar version: 2.0.1

Plugin Example:

Tilt plugin code (requires Deno)
#!/usr/bin/env /opt/homebrew/bin/deno
// <swiftbar.type>streamable</swiftbar.type>

import { readLines } from "https://deno.land/std@0.197.0/io/mod.ts";

let count = 0;

const update = () => {
  console.log("~~~");
  console.log("Test");
  console.log("---");
  // SwiftBar sends "myAction\n" over stdin
  console.log("Trigger Action | stdin=myAction");
  console.log(`Triggered | badge=${count}`);
};

const actions = {
  myAction: () => count++,
};

update();
for await (const action of readLines(Deno.stdin)) {
  actions[action]?.();
  update();
}

Additional Context:

  • I don't run Bartender/Dozer/etc. or tested the issue without it running

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions