From 4375c8c441544fb780e775467deff8109d4b7ef7 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 7 Oct 2016 10:27:25 +0200 Subject: i3/bar: Set network by host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- i3/bar.py | 27 ++++++++++++--------------- 1 file 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",) -- cgit v1.2.3-70-g09d2