From 94eab29107c817bbfba3c4a652b6d119f18f58b1 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sun, 28 Jul 2019 16:04:53 +0200 Subject: [PATCH] made battery status update at most every minute also, stopped updating when no client is attached --- .tmux.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index af1e18b..834de15 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1127,7 +1127,9 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # set -g '@battery_vbar_palette' "$tmux_conf_battery_vbar_palette" \;\ # set -g '@battery_status_charging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_charging")" \;\ # set -g '@battery_status_discharging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_discharging")" -# status_right="#(cut -c3- ~/.tmux.conf | sh -s _battery)$status_right" +# interval=60 +# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _battery' || true +# status_right="#(printf '\n'; while [ \$(tmux display -p '##{session_attached}') -gt 0 ]; do cut -c3- ~/.tmux.conf | sh -s _battery; sleep $interval; done)$status_right" # ;; # esac #