From 6f6f95a120310af2f15f87f1837de6a055cc2f79 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Sun, 9 May 2021 15:32:49 -0500 Subject: [PATCH] modified the tmux status line to deal with multiple batteries. --- tmux/.tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 9f3f965..d5d66d9 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -69,4 +69,4 @@ bind r source-file ~/.tmux.conf #also lengthen the right side status, by mutch more. set -g status-right-length 60 #have the right side status bar display the current battery status and the time/date. - set -g status-right 'battery:#(acpi | cut -d ',' -f 2) | %H:%M %d-%m-%y ' + set -g status-right 'battery:#(acpi | grep -Eo "[0-9]+%" | tr "\n" " " | sed "s/\s\+$//") | %H:%M %d-%m-%y '