claude-statusline-powerline
Version:
Beautiful powerline-style statusline for Claude Code with git integration, session tracking, and cost monitoring
89 lines • 2.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FONT_PROFILES = void 0;
exports.get_font_profile = get_font_profile;
exports.get_symbol = get_symbol;
// Base symbols and separators shared across profiles
const BASE_SYMBOLS = {
branch: ' \uE0A0',
dirty: '\u00B1',
clean: '\u2713',
folder: '📁',
ai: '\u26A1',
warning: '\u2699',
error: '\u2717',
info: '\u2022',
cost: '💰',
ahead: '⇡',
behind: '⇣',
conflicts: '⚠️',
staged_add: '\u207A',
staged_del: '\u207B',
unstaged: '\u02DC',
untracked: '\u1D58',
brain: '🧠',
};
const BASE_SEPARATORS = {
basic: {
left: '\uE0B2',
right: '\uE0B0',
left_thin: '\uE0B3',
right_thin: '\uE0B1',
},
extra: {
curvy: '\uE0B4',
curvy_left: '\uE0B6',
angly: '\uE0B8',
angly_left: '\uE0B9',
angly2: '\uE0BC',
angly2_left: '\uE0BD',
double_chevron: '\uE0B0\uE0B1',
double_chevron_left: '\uE0B2\uE0B3',
},
};
// Helper function to create font profile with base + overrides
function create_font_profile(name, description, symbol_overrides = {}, separator_overrides = {}) {
return {
name,
description,
symbols: { ...BASE_SYMBOLS, ...symbol_overrides },
separators: {
...BASE_SEPARATORS,
extra: { ...BASE_SEPARATORS.extra, ...separator_overrides },
},
};
}
exports.FONT_PROFILES = {
powerline: create_font_profile('Powerline Compatible', 'Basic powerline fonts with core symbol support'),
'nerd-font': create_font_profile('Nerd Font', 'Complete Nerd Font with full powerline and icon support', {
folder: '\uF07B',
ai: '\uF544',
warning: '\uF071',
error: '\uF00D',
info: '\uF05A',
cost: '\uF0D6',
ahead: '\uF062',
behind: '\uF063',
conflicts: '\uF071',
staged_add: '\uF067',
staged_del: '\uF068',
unstaged: '\uF111',
untracked: '\uF128',
brain: '\uF7DC',
}, {
flame: '\uE0C0',
flame_left: '\uE0C1',
}),
};
// Get font profile from config or default to powerline
function get_font_profile(profile_name) {
const name = profile_name || 'powerline';
return exports.FONT_PROFILES[name] || exports.FONT_PROFILES['powerline'];
}
function get_symbol(font_profile, symbol_name, icon_overrides) {
if (icon_overrides && icon_overrides[symbol_name]) {
return icon_overrides[symbol_name];
}
return font_profile.symbols[symbol_name];
}
//# sourceMappingURL=font-profiles.js.map