-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.conf
More file actions
25 lines (21 loc) · 1.27 KB
/
plugin.conf
File metadata and controls
25 lines (21 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# =============================================================================
# psmux-battery - Battery status in psmux status bar
# Static .conf version (source-file compatible)
# =============================================================================
# Use #{@battery_display} in your status-right to show battery info.
# The battery_status.ps1 script updates @battery_percentage, @battery_icon, etc.
# --- Default placeholder values (shown until first poll completes) ---
set -g @battery_percentage "…"
set -g @battery_icon "?"
set -g @battery_status "unknown"
set -g @battery_color "#[fg=default]"
set -g @battery_status_icon "?"
set -g @battery_display "#[fg=default]BAT:…#[default]"
# --- Status bar format showing battery ---
set -g status-right "#{@battery_display} %H:%M %d-%b-%y"
set -g status-interval 5
# Poll battery status on client attach and periodically via status-interval
set-hook -g client-attached 'run-shell "pwsh -NoProfile -File \"~/.psmux/plugins/psmux-battery/scripts/battery_status.ps1\""'
set-hook -g status-interval 'run-shell "pwsh -NoProfile -File \"~/.psmux/plugins/psmux-battery/scripts/battery_status.ps1\""'
# Prefix + b: Show detailed battery info
bind-key b run-shell 'pwsh -NoProfile -File "~/.psmux/plugins/psmux-battery/scripts/battery_info.ps1"'