Add support for sending symbols with custom colors and displaying multiple symbols with configurable display modes.
New UDP message formats:
symbol#color- Single symbol with colorsymbol1#color1, symbol2#color2- Multiple symbols with colors
- Named colors:
red,blue,green, etc. - Hex colors:
#fff,#ffffff,#e20808
echo -n "star.fill#red" | nc -4u -w0 localhost 1738
echo -n "star.fill#fff" | nc -4u -w0 localhost 1738
echo -n "star.fill#red, star.circle.fill#e20808" | nc -4u -w0 localhost 1738- Rotating: Cycle through icons at configurable intervals
- Side-by-side: Display all icons horizontally in menubar
enum DisplayMode {
case single
case rotating(interval: TimeInterval)
case sideBySide
}
struct ColoredSymbol {
let name: String
let color: NSColor
}
enum IconType {
case single(symbol: ColoredSymbol)
case multiple(symbols: [ColoredSymbol], mode: DisplayMode)
case image(Image)
}- Extend existing color mapping
- Add hex color parsing (#RGB and #RRGGBB)
- Support both 3-digit and 6-digit hex codes
- Split by comma for multiple symbols
- Split by # for symbol and color
- Validate symbol names and colors
- Fallback to existing behavior for backward compatibility
- Rotating: Use Timer to cycle through symbols
- Side-by-side: Create composite NSImage with symbols arranged horizontally
- Update statusItem.button?.image accordingly
- Add display mode picker (Single/Rotating/Side-by-side)
- Add rotation interval slider (for rotating mode)
- Show current symbols list
- Existing single symbols work unchanged
- Legacy color commands work unchanged
- Custom images work unchanged
AppDelegate.swift- Core logic, parsing, displaySettingsView.swift- UI for display mode settingstest_udp.py- Add examples for new formatsREADME.md- Document new features
- Test single symbol with named color
- Test single symbol with hex color
- Test multiple symbols with mixed colors
- Test both display modes
- Test backward compatibility