-
Notifications
You must be signed in to change notification settings - Fork 87
PluginYadm
Fábio Luciano edited this page Mar 23, 2026
·
1 revision
Display yadm dotfile repository status showing modified files, untracked files, and commits ahead/behind the remote. The plugin appears in the status bar only when yadm is initialized, and provides real-time status of your dotfile repository.
yadm ~2 ↑1 # 2 modified, 1 ahead - yellow/warning
yadm +3 # 3 untracked - blue/info
yadm # Clean state - green/ok
main ~1 +2 ↑3 # Branch view with changes
# (hidden when yadm not initialized)
| Property | Value |
|---|---|
| Platform | macOS, Linux |
| Dependencies |
git, yadm
|
| Content Type | dynamic |
| Presence | conditional (hidden when yadm is not initialized) |
# macOS (Homebrew)
brew install yadm
# Linux (script install)
curl -fLo /usr/local/bin/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm
chmod a+x /usr/local/bin/yadm
# Linux (Debian/Ubuntu)
sudo apt install yadm
# Linux (Arch)
sudo pacman -S yadm
# Linux (Fedora)
sudo dnf install yadmMake sure yadm is initialized before using this plugin:
yadm init
yadm remote add origin <your-repo-url># Enable plugin
set -g @powerkit_plugins "yadm"# Enable plugin
set -g @powerkit_plugins "yadm"
# Icon
set -g @powerkit_plugin_yadm_icon ""
# Show branch name instead of "yadm" label
set -g @powerkit_plugin_yadm_show_branch "true"
set -g @powerkit_plugin_yadm_branch_max_length "15"
# Cache duration (seconds)
set -g @powerkit_plugin_yadm_cache_ttl "60"| Option | Type | Default | Description |
|---|---|---|---|
@powerkit_plugin_yadm_icon |
icon | |
Plugin icon (cog-outline) |
@powerkit_plugin_yadm_icon_modified |
icon | |
Icon when files are modified |
@powerkit_plugin_yadm_show_branch |
bool | false |
Show branch name instead of "yadm" label |
@powerkit_plugin_yadm_branch_max_length |
number | 15 |
Maximum branch name length (0 to disable truncation) |
@powerkit_plugin_yadm_cache_ttl |
number | 60 |
Cache duration in seconds |
@powerkit_plugin_yadm_show_only_on_threshold |
bool | false |
Only show when warning/error threshold is exceeded |
| State | Condition | Visibility |
|---|---|---|
active |
yadm initialized, repository is valid | Visible |
inactive |
yadm not initialized or not a valid repository | Hidden |
| Level | Condition | Color |
|---|---|---|
ok |
Clean state, no changes, no unpushed commits | Green |
info |
Local modifications (changed or untracked files) | Blue |
warning |
Commits ahead of remote (unpushed commits) | Yellow |
| Context | Description |
|---|---|
clean |
No changes, no unpushed commits |
modified |
Local modifications detected |
unpushed |
Commits ahead of remote |
The plugin shows the yadm status with change indicators:
yadm [~changed] [+untracked] [↑ahead] [↓behind]
Or if show_branch is enabled:
branch [~changed] [+untracked] [↑ahead] [↓behind]
| Symbol | Meaning |
|---|---|
~N |
N modified/staged files |
+N |
N untracked files |
↑N |
N commits ahead of remote (not pushed) |
↓N |
N commits behind remote (need to pull) |
| Display | Meaning |
|---|---|
yadm |
Clean state, no changes |
yadm ~2 |
2 modified files |
yadm +3 |
3 untracked files |
yadm ~1 +2 |
1 modified, 2 untracked |
yadm ↑3 |
3 commits ahead (need to push) |
yadm ↓2 |
2 commits behind (need to pull) |
yadm ~2 ↑1 |
2 modified, 1 ahead |
main ~1 +2 ↑3 |
Branch view with changes |
| (hidden) | yadm not initialized |
The plugin runs yadm status --porcelain=v1 --branch to get repository status and parses:
- Branch information: Current branch name and tracking status
- File changes: Modified (staged/unstaged) and untracked files
- Ahead/behind counts: Commits not pushed/pulled
The plugin is globally relevant as yadm manages $HOME dotfiles regardless of current directory.
set -g @powerkit_plugins "yadm"set -g @powerkit_plugins "yadm"
set -g @powerkit_plugin_yadm_show_branch "true"set -g @powerkit_plugins "group(git,yadm,chezmoi),group(cpu,memory),datetime"set -g @powerkit_plugins "yadm"
set -g @powerkit_plugin_yadm_icon ""
set -g @powerkit_plugin_yadm_icon_modified ""set -g @powerkit_plugins "yadm"
# Check status every 2 minutes instead of every minute
set -g @powerkit_plugin_yadm_cache_ttl "120"- Make sure yadm is initialized:
yadm statusshould work without errors - Check that yadm repository is valid:
yadm rev-parse --is-inside-work-treeshould return true - Verify yadm is in your
$PATH:which yadm - Check dependencies:
git --versionandyadm --version
Clear the PowerKit cache to force a refresh:
# Via keybinding (default: Ctrl+d if configured)
# Or manually:
rm -rf ~/.cache/tmux-powerkit/data/plugin_yadm_*
tmux source ~/.tmux.confIf yadm status is slow, increase the cache TTL:
set -g @powerkit_plugin_yadm_cache_ttl "300" # 5 minutes