-
Notifications
You must be signed in to change notification settings - Fork 87
Troubleshooting
Common issues and solutions for PowerKit.
- Bash Version Issues
- Installation Issues
- Display Issues
- Performance Issues
- Keybinding Issues
- Plugin Issues
- Theme Issues
- Cache Issues
- Debugging
PowerKit requires Bash 5.0+ (5.1+ recommended for optimal performance).
Symptoms:
- Errors about
$EPOCHSECONDSnot being recognized - Errors about
${var,,}bad substitution - Status bar not loading or showing errors
Solutions:
-
Check your Bash version:
bash --version # Should be 5.0 or higher -
macOS: Install Bash 5+ via Homebrew:
brew install bash # Verify Homebrew Bash /opt/homebrew/bin/bash --version # Apple Silicon /usr/local/bin/bash --version # Intel Mac
-
Linux: Update Bash:
# Ubuntu/Debian sudo apt update && sudo apt install bash # Fedora sudo dnf install bash # Arch sudo pacman -S bash
-
Verify tmux uses correct Bash: PowerKit automatically detects Homebrew Bash on macOS. If issues persist:
# Check which bash tmux is using tmux display -p '#{default-shell}' # Or check in a tmux pane echo $BASH_VERSION
Symptoms:
- No performance improvement with Bash 5.1+
-
assoc_expand_oncewarnings
Solutions:
-
Verify Bash 5.1+:
bash -c 'echo ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}' # Should show 5.1 or higher
-
Check if assoc_expand_once is available:
bash -c 'shopt -s assoc_expand_once && echo "OK"'
Symptoms:
- Status bar is empty or shows default tmux format
- No PowerKit elements visible
Solutions:
-
Verify TPM installation:
ls ~/.tmux/plugins/tpm -
Check if PowerKit is installed:
ls ~/.tmux/plugins/tmux-powerkit -
Verify tmux.conf configuration:
grep -E "powerkit|tpm" ~/.tmux.conf
-
Reload tmux configuration:
tmux source-file ~/.tmux.conf -
Install plugins with TPM:
- Press
prefix + I(capital I) to install plugins
- Press
Symptoms:
- Icons appear as boxes, question marks, or weird characters
- Separators don't display correctly
Solutions:
-
Install a Nerd Font:
# macOS brew tap homebrew/cask-fonts brew install font-jetbrains-mono-nerd-font # Linux # Download from https://www.nerdfonts.com/font-downloads
-
Configure your terminal to use the Nerd Font:
- iTerm2: Preferences → Profiles → Text → Font
- Terminal.app: Preferences → Profiles → Font
- Alacritty: Add to
alacritty.yml:font: normal: family: "JetBrainsMono Nerd Font"
-
Verify font installation:
echo -e "\uf240 \ue0b0 \ue0b2" # Should show: battery icon, right arrow, left arrow
Symptoms:
- Error messages about POWERKIT_ROOT
- Plugins fail to load
Solutions:
-
Set POWERKIT_ROOT in shell config:
# Add to ~/.bashrc or ~/.zshrc export POWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit"
-
Or set in tmux.conf:
set-environment -g POWERKIT_ROOT "$HOME/.tmux/plugins/tmux-powerkit"
Symptoms:
- Status bar shows nothing or default format
- PowerKit not rendering
Solutions:
-
Check if plugins are configured:
tmux show-option -g @powerkit_plugins
-
Add plugins to configuration:
set -g @powerkit_plugins "datetime,battery,cpu,memory,hostname,git"
-
Test render script manually:
POWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit" \ ~/.tmux/plugins/tmux-powerkit/bin/powerkit-render
Symptoms:
- Status bar is black and white
- No color differentiation
Solutions:
-
Enable 256 colors in tmux:
# In tmux.conf set -g default-terminal "screen-256color" set -ga terminal-overrides ",*256col*:Tc"
-
Verify terminal supports true color:
echo -e "\033[38;2;255;100;0mTrueColor Test\033[0m" # Should show orange text
-
Check TERM environment variable:
echo $TERM # Should be xterm-256color, screen-256color, or similar
Symptoms:
- Separators showing wrong characters
- Powerline glyphs not aligned
Solutions:
-
Use a compatible Nerd Font
-
Try different separator styles:
set -g @powerkit_separator_style "rounded" # Options: normal, rounded, flame, pixel, honeycomb, none
-
Check for font rendering issues:
- Some fonts have different glyph widths
- Try a different Nerd Font
Symptoms:
- Status bar takes a long time to update
- tmux feels sluggish
Solutions:
-
Reduce number of plugins:
# Use only essential plugins set -g @powerkit_plugins "datetime,battery"
-
Increase cache TTL for slow plugins:
set -g @powerkit_plugin_weather_cache_ttl "3600" # 1 hour set -g @powerkit_plugin_github_cache_ttl "300" # 5 minutes
-
Increase status-interval:
set -g @powerkit_status_interval "10" # Update every 10 seconds
-
Disable network-dependent plugins:
- weather, github, gitlab, stocks, crypto
-
Use
show_only_on_thresholdoption:set -g @powerkit_plugin_cpu_show_only_on_threshold "true"
Symptoms:
- tmux using excessive CPU
- System feels slow
Solutions:
-
Identify slow plugins:
time POWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit" \ ~/.tmux/plugins/tmux-powerkit/bin/powerkit-plugin cpu
-
Check for network timeouts:
- Network plugins may hang waiting for responses
- Increase timeouts or reduce cache refresh
-
Clear cache:
- Press
prefix + Alt+x(default keybinding) - Or manually:
rm -rf ~/.cache/tmux-powerkit/
- Press
Symptoms:
- Keybindings using
M-(Meta/Alt) don't work - Pressing Option + key types special characters instead
Cause:
On macOS, the Option key sends special Unicode characters by default instead of acting as Meta/Alt. Terminal emulators need explicit configuration to use Option as Meta.
Solutions:
Configure your terminal emulator:
| Terminal | Configuration |
|---|---|
| Ghostty |
macos-option-as-alt = true in config |
| iTerm2 | Preferences → Profiles → Keys → Left/Right Option Key → Esc+ |
| Alacritty |
option_as_alt = "Both" in [window] section |
| Kitty |
macos_option_as_alt yes in config |
| WezTerm |
send_composed_key_when_left_alt_is_pressed = false in Lua config |
| Terminal.app | Settings → Profiles → Keyboard → Use Option as Meta key |
See Keybindings - macOS Alt Key Setup for detailed configuration examples.
Alternative: Use Ctrl-based keybindings instead:
set -g @powerkit_plugin_audiodevices_keybinding_input "C-S-i"Symptoms:
- PowerKit keybinding doesn't work
- Conflict notification at startup
Solutions:
-
View conflicts:
- Press
prefix + C-yto open keybindings viewer - Check the conflicts section
- Press
-
Change conflicting keybinding:
set -g @powerkit_plugin_<plugin>_keybinding_<action> "new-key"
-
Change conflict action:
# Skip PowerKit binding if conflict exists set -g @powerkit_keybinding_conflict_action "skip"
Symptoms:
- Plugin displays "N/A" instead of data
- Plugin is visible but no useful information
Solutions:
-
Check plugin dependencies:
# Test plugin directly POWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit" \ ~/.tmux/plugins/tmux-powerkit/bin/powerkit-plugin <plugin_name>
-
Install missing dependencies:
- See individual plugin documentation for requirements
-
Check platform support:
- Some plugins are macOS or Linux only
Symptoms:
- Plugin configured but not visible
- No errors, just missing
Solutions:
-
Check if plugin is in the list:
tmux show-option -g @powerkit_plugins
-
Verify plugin state:
- Conditional plugins hide when
state=inactive - Example: battery plugin hides on desktops without battery
- Conditional plugins hide when
-
Check
show_whenorshow_only_on_thresholdoptions:# Some plugins hide by default set -g @powerkit_plugin_wifi_show_when "always"
Symptoms:
- Incorrect values displayed
- Data doesn't match system state
Solutions:
-
Clear plugin cache:
- Press
prefix + Alt+x - Or:
rm ~/.cache/tmux-powerkit/data/<plugin_name>_*
- Press
-
Test data collection:
# Test the underlying command # Example for CPU: top -l 1 | grep "CPU usage" # macOS cat /proc/stat # Linux
-
Check for permission issues:
- Some plugins need special permissions
- Example: temperature on Linux may need root
Symptoms:
- Default colors showing instead of theme
- Colors don't match expected theme
Solutions:
-
Verify theme configuration:
tmux show-option -g @powerkit_theme tmux show-option -g @powerkit_theme_variant
-
Check theme exists:
ls ~/.tmux/plugins/tmux-powerkit/src/themes/ -
Clear theme cache:
rm ~/.cache/tmux-powerkit/data/theme_colors__*
-
Reload tmux:
tmux source-file ~/.tmux.conf
Symptoms:
- Custom theme file ignored
- Default theme used instead
Solutions:
-
Check custom theme path:
set -g @powerkit_custom_theme_path "/path/to/my-theme.sh"
-
Verify theme file is valid:
bash -n /path/to/my-theme.sh
-
Check required colors are defined:
- See Theme Contract for required colors
PowerKit uses a multi-layer caching system. See Caching System for detailed documentation.
Symptoms:
- Old data showing despite changes
- Plugin not updating
Solutions:
-
Clear all cache:
- Press
prefix + Alt+x - Or:
rm -rf ~/.cache/tmux-powerkit/
- Press
-
Reduce cache TTL:
set -g @powerkit_plugin_<name>_cache_ttl "30"
-
Force refresh:
tmux refresh-client -S
-
Check for event-based invalidation:
- Some plugins (like
packages) have automatic invalidation - See individual plugin documentation
- Some plugins (like
Symptoms:
- Disk space warnings
- Cache growing indefinitely
Solutions:
-
Clear cache directory:
rm -rf ~/.cache/tmux-powerkit/ -
Set up periodic cleanup:
# Add to crontab 0 0 * * * rm -rf ~/.cache/tmux-powerkit/data/*
Symptoms:
- Slow status bar updates
- Same data collected repeatedly
Solutions:
-
Check cache directory permissions:
ls -la ~/.cache/tmux-powerkit/ -
Verify cache is being written:
watch -n1 'ls -la ~/.cache/tmux-powerkit/data/ | tail -10' -
Ensure POWERKIT_ROOT is set correctly:
tmux show-environment POWERKIT_ROOT
# Enable debug mode
export POWERKIT_DEBUG=true
# View logs
tail -f ~/.cache/tmux-powerkit/logs/powerkit.logPOWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit" \
~/.tmux/plugins/tmux-powerkit/bin/powerkit-plugin batteryPOWERKIT_ROOT="$HOME/.tmux/plugins/tmux-powerkit" \
~/.tmux/plugins/tmux-powerkit/bin/powerkit-render- Press
prefix + C-e(default keybinding) - Shows all PowerKit options and values
- Press
prefix + C-y(default keybinding) - Shows all PowerKit keybindings
-
Check plugin documentation:
- Each plugin has its own wiki page with troubleshooting
-
Search existing issues:
-
Create a new issue:
- Include tmux version:
tmux -V - Include shell:
echo $SHELL - Include OS:
uname -a - Include relevant config from
~/.tmux.conf
- Include tmux version:
- Installation - Setup guide
- Configuration - All options
- Architecture - How PowerKit works
- Caching System - Cache architecture and optimization