Configure your Claude Code status line interactively
/plugin marketplace add zeulewan/zeul-claude-plugins/plugin install custom-statusline@zeul-claude-pluginsConfigure the user's Claude Code status line by asking what elements they want displayed.
Use AskUserQuestion with these exact options (split into 2 questions due to 4-option limit):
Question 1 - Core elements:
Question: "Which core elements do you want in your status line?"
Header: "Core"
multiSelect: true
Options:
1. Label: "Current directory", Description: "Show working directory path"
2. Label: "Nerd Font icons", Description: "Show all icons (requires Nerd Font installed)"
3. Label: "Git branch & status", Description: "Show branch, dirty/clean, ahead/behind"
4. Label: "Model name", Description: "Show current Claude model"
Question 2 - Tracking elements:
Question: "Which tracking elements do you want?"
Header: "Tracking"
multiSelect: true
Options:
1. Label: "Session duration", Description: "Show time elapsed in session"
2. Label: "API usage (5h/7d)", Description: "Show Claude API usage percentages"
3. Label: "Context % till compact", Description: "Show context window usage"
Based on user selections, write ~/.claude/statusline-config.json:
{
"show_cwd": true,
"show_icons": true,
"show_git": true,
"show_model": true,
"show_duration": true,
"show_usage": true,
"show_context": true
}
Set each value to true or false based on whether the user selected that option.
The statusline.sh script is included in the plugin. Update ~/.claude/settings.json to point to it using a shell wrapper that finds the plugin's script:
{
"statusLine": {
"type": "command",
"command": "bash -c \"$(find ~/.claude/plugins/cache/zeul-claude-plugins/custom-statusline -name statusline.sh 2>/dev/null | head -1)\""
}
}
This wrapper dynamically locates the script in the plugin cache, so it survives plugin version updates.
Tell the user:
~/.claude/statusline-config.json/custom-statusline again to reconfigure