diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2016-10-07 10:27:25 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2017-06-01 18:37:35 +0200 |
commit | 4375c8c441544fb780e775467deff8109d4b7ef7 (patch) | |
tree | af99ee864ba85021b95e7eee8261b1c757ac27c9 /i3 | |
parent | 61c0683ebc4e5ae1f17daf078199ddcc315b4064 (diff) | |
download | dotfiles-4375c8c441544fb780e775467deff8109d4b7ef7.tar.xz |
i3/bar: Set network by host
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'i3')
-rw-r--r-- | i3/bar.py | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -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",) |