From 1b9ca04faeb9db9c078b13c7fcf89b20fd8257d9 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 1 Jun 2017 18:59:02 +0200 Subject: i3: bar: add hydrogen battery config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- i3/bar.py | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'i3') diff --git a/i3/bar.py b/i3/bar.py index 5415180..1f7df7f 100644 --- a/i3/bar.py +++ b/i3/bar.py @@ -11,17 +11,40 @@ status.register("clock", format="%y-%m-%d %H:%M:%S%z",) -status.register("battery", - format="⚡:{percentage:.2f}% {remaining:%E%hh:%Mm}{status}", - alert=True, - alert_percentage=5, - status={ - "DIS": "↓", - "CHR": "↑", - "FULL": "=", - }, - battery_ident="BAT0",) - +if hostname == "hydrogen.kyriasis.com": + status.register("battery", + format="⚡0:{percentage:.2f}% {remaining:%E%hh:%Mm}{status}", + alert=True, + alert_percentage=5, + status={ + "DIS": "↓", + "CHR": "↑", + "FULL": "=", + }, + battery_ident="BAT0",) + + status.register("battery", + format="⚡1:{percentage:.2f}% {remaining:%E%hh:%Mm}{status}", + alert=True, + alert_percentage=5, + status={ + "DIS": "↓", + "CHR": "↑", + "FULL": "=", + }, + battery_ident="BAT1",) + +else: + status.register("battery", + format="⚡:{percentage:.2f}% {remaining:%E%hh:%Mm}{status}", + alert=True, + alert_percentage=5, + status={ + "DIS": "↓", + "CHR": "↑", + "FULL": "=", + }, + battery_ident="BAT0",) status.register("temp", format="{temp:.0f}°C",) -- cgit v1.2.3-54-g00ecf