aboutsummaryrefslogtreecommitdiffstats
path: root/i3
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:59:02 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:59:02 +0200
commit1b9ca04faeb9db9c078b13c7fcf89b20fd8257d9 (patch)
tree73b2b347bdd8ddf5c634c13cb4e4e8f3afa05424 /i3
parent9d5290a4f62476190c25dc0c2a64f86e45f37dbb (diff)
downloaddotfiles-1b9ca04faeb9db9c078b13c7fcf89b20fd8257d9.tar.xz
i3: bar: add hydrogen battery config
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'i3')
-rw-r--r--i3/bar.py45
1 files changed, 34 insertions, 11 deletions
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",)