aboutsummaryrefslogtreecommitdiffstats
path: root/i3/bar.py
blob: 064eafc4bd7850987144a14e769e2d74bd7b9a1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-

import subprocess

from i3pystatus import Status

status = Status(standalone=True)

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",)


status.register("temp",
    format="{temp:.0f}°C",)

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]
status.register("disk",
    path="/media",
    format="{avail}G",)

status.register("disk",
    path="/",
    format="{avail}G",)



status.run()