Export a profile to a file and import it from Settings → Profiles

Aperta
#803 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
swift
Ambito
desktop

Direzione di ricerca

Start in Settings → Profiles and trace how profile actions, right-click menus, validation, and Undo are implemented; the issue identifies no source files or tests. Then inspect the profile merge and --batch paths, plus the package review flow for commands. Done means export and import meet the listed behaviors, including validation, name conflicts, and safety review; the open questions need decisions first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Problem

A profile can't leave the configuration it lives in. Moving one to another Mac, sharing it with someone, or keeping a copy before changing it means opening the main file, finding the profile in profiles and copying its JSON by hand. Settings → Profiles can create, edit, preview and delete profiles, but has no way to save one to a file or bring one in.

Proposal

Export

  • Export profile… in a profile's actions and in its card's right-click menu saves a .json file holding that one profile: name, when, enabled and configuration, as it's in effect.
  • A profile merged from a theme, package or include and the main file exports merged, so the file stands on its own.

Import

  • Import profile… beside New profile opens a .json file holding one profile and adds it to the main file, with one Undo step, like New profile.
  • It's checked like a profiles edit before anything is saved; an invalid file shows the error and changes nothing.
  • A name that already exists asks whether to replace that profile or keep both under a new name (Night 2).
  • A profile whose configuration adds widgets with commands, providers or environment variables is reviewed first, like a package with commands, since the file can come from anyone.

Command line

  • A way to print one profile as JSON, such as StableBar --export-profile NAME. Importing already works with --batch and a profiles action.

Open questions

  • A profile that references widgets, templates or tokens the other configuration lacks fails validation (unknown widgetOverrides targets reject the edit). Refuse it with a message naming what's missing, or import it turned off so it can be fixed?
  • Should export also carry the tokens the profile references but doesn't define, so it doesn't depend on the theme it was made with?

Possible today

Partly: copy the profile's object from the main file's profiles and paste it into the other configuration, apply it with StableBar --batch and a profiles action, or keep shared profiles in a file listed in includes. None of these is available from Settings or gives you a single file to hand over.

Related

  • #667 added Delete profile…; export would sit beside it in the same actions and right-click menu.
  • #91 / Save as Theme… exports the look as a theme package, but leaves profiles in the main file.
  • #676 opens a shared theme from a link; a theme can carry profiles, but only theme keys, so it can't carry a profile with widgets.
  • #24 merges profiles by name across layers, which decides how an imported profile with an existing name combines.

Triaged by Claude Code (Claude Opus 5.5).

Lingua principale
Swift
Stelle
184
Fork
12
Merge medio
3h 50m
PR unite (30g)
387

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Seb-GRAF/StableBar

Tutte le issue di Seb-GRAF/StableBar

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.