Ejemplo n.º 1
0
# Shows the average load of the last minute and the last 5 minutes
# (the default value for format is used)
status.register("temp", format='{temp} °C')

status.register("cpu_usage_bar", bar_type="vertical")

status.register("cpu_usage", format='  {usage:02.0f}%')

# Display memory
status.register('mem', format='  {percent_used_mem}%')

status.register("updates",
                format=" {count}",
                format_no_updates="",
                backends=[pacman.Pacman(), cower.Cower()])

status.register(
    "mpd",
    format=" {status} {artist} - {title} {song_elapsed}/{song_length}",
    host="localhost",
    port=6600,
    max_len=50)

if isLaptop:
    status.register("file",
                    format="{workTime}",
                    components={"workTime": (lambda x: x, "tmp/workTime")})

status.run()
Ejemplo n.º 2
0
status.register("mpd",
    format="{title}{status}{album}",
    status={
        "pause": "▷",
        "play": "▶",
        "stop": "◾",
    },)

#keyboard layout
status.register("xkblayout", layouts=["us", "it"])

# keyboard locks
status.register("keyboard_locks",
    format = "{caps} {num} {scroll}",
    hints = {"markup": "pango"},
    caps_on    = "<span color=\"#1794d1\">CAP</span>",
    caps_off   = "<span color=\"#999999\">___</span>",
    num_on     = "<span color=\"#1794d1\">NUM</span>",
    num_off    = "<span color=\"#999999\">___</span>",
    scroll_on  = "<span color=\"#1794d1\">SCR</span>",
    scroll_off = "<span color=\"#999999\">___</span>",
    color = "#999999",
)

status.register("updates", 
    backends = [pacman.Pacman(), yaourt.Yaourt()],
    color="#1794D1",
)

status.run()
Ejemplo n.º 3
0
status.register("mem",
                format="MEM {percent_used_mem}%",
                on_leftclick="terminator --geometry=600x400 -x htop")

status.register("cpu_usage",
                format="CPU {usage}%",
                hints={
                    "color": "#ffffff",
                    "full_text": "CPU 4%",
                    "min_width": "CPU 100%",
                    "align": "center"
                },
                on_leftclick="terminator --geometry=600x400 -x htop")

status.register("network",
                interface="eno1",
                format_up="{v4cidr}",
                format_down="")

status.register("updates",
                backends=[pacman.Pacman()],
                format="Updates: {count}",
                interval=1800)

status.register("disk",
                hints={"color": "#ffffff"},
                path="/",
                format=" root {percentage_used:.0f}% ")

status.run()
Ejemplo n.º 4
0
HINTS = {"separator_block_width": 17}
HINTS_NO_SEP = dict(HINTS, separator=False)

status = Status(interval=1)

status.register(
    PersistOutputModule(
        command='~/.config/i3blocks/kbdd',
        hints=dict(HINTS, min_width='English (US)  '),
        shell=True
    )
)

status.register(MyUpdates(
    backends=[pacman.Pacman(), yay.Yay()],
    format=' {count}',
    format_summary='Available Updates: {count}',
    color_working='#FFFF00',
    hints=dict(HINTS)
))

status.register("clock",
    on_leftclick=["gsimplecal"],
    format=" %a %-d %b %X",
    hints=dict(HINTS, min_width="0"*16)
)

status.register("network",
    interface="eth0",
    format_up=" {bytes_sent}   {bytes_recv} MB/s",