aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-10-07 10:27:25 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:37:35 +0200
commit4375c8c441544fb780e775467deff8109d4b7ef7 (patch)
treeaf99ee864ba85021b95e7eee8261b1c757ac27c9
parent61c0683ebc4e5ae1f17daf078199ddcc315b4064 (diff)
downloaddotfiles-4375c8c441544fb780e775467deff8109d4b7ef7.tar.xz
i3/bar: Set network by host
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--i3/bar.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/i3/bar.py b/i3/bar.py
index 9acb003..bb0387a 100644
--- a/i3/bar.py
+++ b/i3/bar.py
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
+import socket
+
from i3pystatus import Status
+hostname = socket.gethostname()
status = Status(standalone=True)
status.register("clock",
@@ -25,21 +28,15 @@ status.register("temp",
status.register("pulseaudio",
format="♪:{volume}%",)
-# status.register("mpd",
-# format="{status} {artist} > {title}",
-# status={
-# "pause": "✧",
-# "play": "▶",
-# "stop": "◾",
-# },)
-
-status.register("network",
- interface="wlp4s0",
- format_up="{essid:.10s}: {v4cidr} {quality:3.0f}%",)
-
-# Shows disk usage of /
-# Format:
-# 42/128G [86G]
+if hostname == "tirxu.kyriasis.com":
+ status.register("network",
+ interface="wlp4s0",
+ format_up="{essid:.10s}: {v4cidr} {quality:3.0f}%",)
+
+ status.register("network",
+ interface="enp0s20u3u1u3",
+ format_up="{interface}: {v4cidr}")
+
status.register("disk",
path="/boot",
format="{avail}G",)