make tmux show the battery in the status line

This commit is contained in:
sebastian committed 2026-09-17 14:52:39 +02:00
1 parent 07c5ee399f
commit 148dc3c783
2 files changed
+28

No files matched your search

+21
View File
@@ -27,6 +27,23 @@ set-window-option -g pane-base-index 1
#set -g @tmux_power_theme 'forest'
#
#Battery in the status bar (next to the time)
#set -g status-right '#{battery_icon_status} #{battery_percentage} | %H:%M '
set -g status-interval 30
# Optional: color by charge level
set -g @batt_icon_status_charged '󰁹'
set -g @batt_icon_status_charging '󰂄'
set -g @batt_icon_status_discharging '󰁾'
set -g @batt_icon_status_attached '󰚥'
# (status-right is set by tmux-power; the battery gets appended below after TPM)
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
#
# Tmux Power
#
@@ -107,6 +124,10 @@ set -ga update-environment TERM_PROGRAM
run '~/.config/tmux/plugins/tpm/tpm'
# Battery: insert before tmux-power's time segment, then let tmux-battery fill in the placeholders
run '~/.config/tmux/tmux-battery-insert.sh'
run '~/.config/tmux/plugins/tmux-battery/battery.tmux'
# Pane-Titel anzeigen
set -g pane-border-status top
set -g pane-border-format ' #{pane_index}: #{pane_title} '