def test_missing_required_shows_error(): """ Ensure that when an a required module parameter is missing an error is shown in the bar. """ status = Status(standalone=False) status.register("text") assert len(status.modules) > 0 assert status.modules[0].output is not None assert "ConfigMissingError" in status.modules[0].output['full_text']
def test_invalid_module_kwarg_shows_error(): """ Ensure that when an invalid module kwarg is passed an error is shown in the bar. """ status = Status(standalone=False) status.register("text", foo='bar') assert len(status.modules) > 0 assert status.modules[0].output is not None assert "ConfigKeyError" in status.modules[0].output['full_text']
"""Status bar for i3-wm""" # -*- coding: utf-8 -*- from i3pystatus import Status import netifaces STATUS = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week STATUS.register( "clock", format="%F W%V %X", ) # Shows pulseaudio default sink volume # # Note: requires libpulseaudio from PyPI # status.register("pulseaudio", # format="VOL {volume}%",) STATUS.register("mem", format="MEM {used_mem:5.0f} MiB", divisor=1048576) STATUS.register("cpu_usage", format="CPU {usage:3.0f}%") for interface in netifaces.interfaces(): STATUS.register("network", interface=interface, divisor=125000, format_up=("{interface}: {essid} {quality:3.0f}% "
# -*- coding: utf-8 -*- import subprocess import os.path from i3pystatus import Status from i3pystatus.weather import weathercom status = Status(standalone=True) #show a dot status.register("anybar") # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", on_leftclick= "[ $( ps -eo cmd | grep -c '[t]ermite --title scratchpad_cal' ) -eq 2 ] && termite --title scratchpad_cal -e 'pal -m' || i3-msg [title=scratchpad_cal] scratchpad show;" ) # Show sound status.register( "pulseaudio", format="\U0001D160 {volume}", ) #status.register("alsa", # format="\U0001D160 {volume}", # color_muted="#FF0000",
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X KW%V",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register("temp", format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage # goes below 5 percent while discharging. The block will also color RED.
#!/bin/env python import subprocess from i3pystatus import Status status = Status(standalone=True) green="#1A8C01" white="#FFFFFF" purple="#D175FF" red="#FF6600" blue="#4581DD" yellow="#DDDD11" #Clock status.register("clock", format="%a %d %R", color=white) #Battery status.register("battery", color=yellow, charging_color=purple, full_color=green, critical_color=red, format="❤: {percentage:02.0f}%", interval=1) # CPU temperature status.register("temp", color=white, format="{temp:.0f}°C") # CPU usage (text) # status.register("cpu_usage", format="▣ CPU: {usage_cpu1:02}% {usage_cpu1:02}% {usage_cpu2:02}% {usage_cpu3:02}%", interval=1) status.register("cpu_usage", format="▣: {usage:02.0f}%", interval=1) # RAM status.register("mem", color=blue, format="≣: {percent_used_mem:02.0f}%", interval=1)
#!/usr/bin/env python # -*- coding: utf-8 -*- from i3pystatus import Status from i3pystatus.mail import thunderbird status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("disk", path="/", critical_limit = 5, format = "root: {avail}GB/{total}GB", ) status.register("disk", path="/boot", critical_limit = 20, divisor = 1024 ** 2, format = "boot: {avail}MB/{total}MB", ) status.register("disk", path="/home", critical_limit = 20, format = "home: {avail}GB/{total}GB", ) status.register("usb", hints = {"markup": "pango"}, ) status.register("mpd",
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Shows pulseaudio default sink volume # # Note: requires libpulseaudio from PyPI status.register("pulseaudio", format=" {volume}", format_muted=" ") # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format=" %a %-d %b %X KW%V",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows disk usage of / # Format: # 42/128G [86G] status.register("disk", path="/", format=" {avail}G",)
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%a %h %-d %I:%M", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if the percentage # goes below 5 percent while discharging. The block will also color RED. # If you don't have a desktop notification demon yet, take a look at dunst: # http://www.knopwob.org/dunst/
#import subprocess import os from i3pystatus import Status import netifaces green = "#8ae234" yellow = "#fce94f" orange = "#f57900" red = "#ef2929" gray = "#aaaaaa" status = Status(standalone=True) status.register("keyboard_locks", format="{caps}", caps_off="", caps_on=" CAPS", color="#ff0000") status.register("clock", format=" %a %d/%m %X ",) if os.uname()[1] == 'stark': status.register("battery", format=" {status} {percentage:.1f}% {remaining:%E%h:%M} ", alert=True, alert_percentage=5, status={ "DIS": "", "CHR": "", "FULL": "", }, not_present_text = " ", full_color=green, charging_color=yellow, critical_color=red, not_present_color=gray, )
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%Y-%m-%d %H:%M:%S", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", ) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if the percentage # goes below 5 percent while discharging. The block will also color RED.
from i3pystatus import Status status = Status(standalone=True) # First separator status.register( "text", text="", ) # Volume status.register( "pulseaudio", format="🔊 {volume}", format_muted="🔇 {volume}", color_muted="#FFD801", on_leftclick="zsh /home/plastic/.config/i3pystatus/pulseaudio.sh", hints={ "separator_block_width": 42, }, ) # Battery status.register( "battery", format="{status} {percentage_design:.0f}%{remaining:%E %hh%Mm}", alert=True, alert_percentage=10, full_color="#3BB9FF", color="#FFD801", charging_color="#4AA02C",
from i3pystatus import Status from i3pystatus.weather import weathercom # For FontAwesome icons, use unicode: \uf0a0 status = Status(logfile='/home/matt/var/i3pystatus.log') status.register( "clock", format="%Y-%m-%d %H:%M:%S", color="#fba922", ) # Shows the average load of the last minute and the last 5 minutes status.register( "load", color="#198844", critical_color="#969896", ) status.register( "battery", format="{status}/{consumption:.2f}W " "{percentage:.2f}% " "[{percentage_design:.2f}%] " "{remaining:%E%hh:%Mm}", not_present_text='', alert=True, alert_percentage=5, status={ "DIS": "↓",
#!/home/k/virtualenvs/i3pystatus/bin/python3 from i3pystatus import Status from i3pystatus.mail import imap import locale import os.path import configparser locale.setlocale(locale.LC_ALL, 'pl_PL') status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %d.%m %H:%M", interval=5, on_leftclick="zenity --calendar") # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage # goes below 5 percent while discharging. The block will also color RED. status.register( "battery", format= "{status} [{consumption:.1f}W ]{percentage:.0f}%[ {remaining:%E%hh:%Mm}]",
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%a %-d %b %X KW%V", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", ) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full:
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X",) # Shows your CPU temperature, if you have a Intel CPU # status.register("temp", # format="{temp:.0f}°C",) status.register("cpu_usage", format="{usage:02}%",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage # goes below 5 percent while discharging. The block will also color RED. status.register("battery", format="{status} {consumption:.0f}W {percentage_design:.0f}% {remaining:%E%hh:%Mm}",
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%F %H:%M:%S KW%V", on_rightclick="orage", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", ) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if the percentage
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X", color="#9a875f") status.register("weather", location_code="GMXX0007") # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) # status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for # details # This would look like this, when discharging (or charging)
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format=" %a %-d %b %X", on_leftclick = 'notify-send -t 5000 "$(gcalcli --nocolor agenda)\\n"' ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load", critical_limit=4., format=' {avg1} {avg5} {avg15}', critical_color="#ffffff") status.register("mem", format=' {percent_used_mem}%', color='#ffffff') # Shows your CPU temperature, if you have a Intel CPU # status.register("temp", # format="{temp:.0f}°C",)
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) status.register("clock", format="\uf133 %Y-%m-%d \uf017 %T",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) #status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) status.register("battery", format="{status} {percentage_design:.2f}% {remaining:%E%hh:%Mm}", alert=True, alert_percentage=5, status={ "DIS": "\uf0e7", "CHR": "\uf1e6", "FULL": "\uf0e7", },) status.register("network",
import multiprocessing import os import subprocess import color import icons from i3pystatus import Status from i3pystatus.disk import Disk import yubikey status = Status(standalone=True) status.register( "mpd", format="{title} {status} {album} {song_elapsed}/{song_length}", status={"pause": "", "play": "▶", "stop": "◾"}, color=color.text_normal, ) status.register( "network", interface="eth1", format_up="{v4cidr} {bytes_sent}/s|{bytes_recv}/s", color_down=color.text_down, color_up=color.text_up, auto_units=True ) icons.conkysymbol(status, "i") status.register( "disk", path="/", format="{used}/{total}G [{avail}G]", color=color.text_normal
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # audio status.register("pulseaudio", # color="#000000", color_muted="#c57b0e", format_muted="♪: M",) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", # color="#000000", format="%a %-d %b %X",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load", # color="#000000", critical_color="#c57b0e",) # Shows the current memory usage by the system in MiB status.register("mem", color="#3eb0d1", warn_color="#c57b0e", alert_color="#c57b0e",
#!/usr/bin/python3 # -*- coding: utf-8 -*- from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="🕑 %a %-d %b %H:%M:%S", color="#50C878") # status.register("shell", # command="python3 ~/.config/i3/msexchangeclient.py mail", # interval=5, # color="#41eef4") # status.register("shell", # command="python3 ~/.config/i3/msexchangeclient.py up-meeting", # on_leftclick="python3 ~/.config/i3/msexchangeclient.py dismiss-meeting", # on_rightclick="python3 ~/.config/i3/msexchangeclient.py show-meetings", # interval=5, # color="#E5B800") status.register("uptime", format="🕰 {days}:{hours}:{mins}:{secs}", color="#FFF0FF") # Shows pulseaudio default sink volume # # Note: requires libpulseaudio from PyPI
darkgreen = "#9acbad" yellow = "#abb773" darkyellow = "#c5cba4" blue = "#7865c5" darkblue = "#a396d9" magenta = "#bb65b6" darkmagenta = "#cf96cf" cyan = "#68a8c5" darkcyan = "#9ac1d9" white = "#f1edfb" darkwhite = "#f1edfb" background = "#133B47" status = Status(standalone=True) status.register("clock", format="%a %-d %b %X",) # status.register("battery", # format="{status} {percentage:.0f}% {remaining:%E%hh:%Mm}", # alert=True, # alert_percentage=5, # color=white, # critical_color=red, # charging_color=yellow, # full_color=white, # status={ # "DIS": "DIS", # "CHR": "CHR",
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%a %-d %b %X", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", ) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if the percentage # goes below 5 percent while discharging. The block will also color RED.
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X",) status.register("weather", location_code="GMXX0007", colorize=True, interval=20, format="{current_temp} / {current_wind}", ) # Shows pulseaudio default sink volume # # Note: requires libpulseaudio from PyPI status.register("pulseaudio", format="♪{volume}",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") status.register("mem",
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status from i3pystatus import mpd status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X Week %V",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) #status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status from i3pystatus.mail import imap status = Status(standalone=True) status.register("pulseaudio", format="♪ {volume_bar}", multi_colors=True, color_unmuted='#00ff00', vertical_bar_width=2, bar_type='vertical') status.register("clock", format="%a %d %b %I:%M:%S",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register("temp", format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this: # Discharging 6h:51m
#!/usr/bin/env python3 import os from subprocess import run from glob import glob import netifaces from i3pystatus import Status terminal = 'gnome-terminal' is_notebook = os.path.isdir('/proc/acpi/battery/') or glob('/sys/class/power_supply/BAT*') status = Status(interval=1) status.register('clock', format='%X') status.register('clock', format='%a %-d %b W%V', interval=30) #status.register('temp', format='{temp:.0f}°C') if is_notebook: batfmt = 'Bat: {status}{percentage:.2f}% {remaining:%E%hh:%Mm}' status.register('battery', format=batfmt, alert=True, alert_percentage=10, status={'DIS': '↓', 'CHR': '↑', 'FULL': ''}) status.register('pulseaudio', format='♪{volume}') status.register('load', format='{avg1} {avg5} {avg15}', on_leftclick=f'{terminal} -e "htop --sort-key=PERCENT_CPU"') status.register('mem', format='Mem: {percent_used_mem:.2f}%', on_leftclick=f'{terminal} -e "htop --sort-key=PERCENT_MEM"') ifaces = netifaces.interfaces() ifaces = sorted(ifaces, key=len) lan1 = next(( i for i in ifaces if i.startswith('enp')), None) if lan1: status.register('network', interface=lan1,
from i3pystatus import Status #This file is used for i3pystatus, modified default one to include network up/down, CPU usage and removed (commented out) the unneeded stuff. status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%Y-%m-%d %H:%M:%S KW%V", ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", ) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if thepercentage # goes below 5 percent while discharging. The block will also color RED.
from i3pystatus import Status from i3pystatus import get_module green = "#98bc37" red = "#f75341" yellow = "#fed06e" status = Status(standalone=True, click_events=False) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week # status.register("clock", format = [ ('%a %b %-d %b %X', 'UTC'), ("%a %-d %b %R", "%X") ]) # format="%a %-d %b %R",) status.register("clock", format=("FR %H:%M:%S", "Europe/Paris")) status.register("clock", format=("%Y-%m-%d", "Europe/Paris")) status.register("clock", format=("UTC %H:%M", "UTC")) # status.register("clock", format = ("%H:%M")) # status.register("clock", format = ("%a %-d %b %R", "Asia/Singapore")) # format="%a %-d %b %R",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) # status.register("load", format="{avg1}") status.register( "mem", format="MEM {percent_used_mem}%", color="white", warn_percentage=80,
#!/usr/bin/python3 from i3pystatus import Status import locale locale.setlocale(locale.LC_ALL, 'nb_NO.UTF-8') status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %d.%m %H:%M", interval = 5) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage # goes below 5 percent while discharging. The block will also color RED. #status.register("battery", # format="{status} [{consumption:.1f}W ]{percentage:.0f}%[ {remaining:%E%hh:%Mm}]", # alert=True, # alert_percentage=5, # status={ # "DIS": "↓", # "CHR": "↑", # "FULL": "⚡"
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%F %A %T",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via D-Bus) if the percentage # goes below 5 percent while discharging. The block will also color RED. # If you don't have a desktop notification demon yet, take a look at dunst: # http://www.knopwob.org/dunst/ # status.register("battery", # format="{status}/{consumption:.2f}W {percentage:.2f}% [{percentage_design:.2f}%] {remaining:%E%hh:%Mm}", # alert=True, # alert_percentage=5, # status={ # "DIS": "↓", # "CHR": "↑", # "FULL": "=", # },)
from i3pystatus_custom_modules import CustomBackupsMonitor from i3pystatus import Status status = Status(standalone=True) status.register("clock", format="%Y-%m-%d %H:%M:%S",) status.register("pomodoro", sound="~/dotfiles/scripts/fire-pager.wav",) # Shows pulseaudio default sink volume # Note: requires libpulseaudio from PyPI status.register("pulseaudio", format="♪: {volume}%",) status.register("backlight", format="* {brightness}/{max_brightness}", interval=2, ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load", critical_limit=4, format="{avg1} {tasks}", ) # Shows your CPU temperature, if you have a Intel CPU # status.register("temp", # format="{temp:.0f}°C",)
darkgreen = "#9acbad" yellow = "#abb773" darkyellow = "#c5cba4" blue = "#7865c5" darkblue = "#a396d9" magenta = "#bb65b6" darkmagenta = "#cf96cf" cyan = "#68a8c5" darkcyan = "#9ac1d9" white = "#f1edfb" darkwhite = "#f1edfb" background = "#133B47" status = Status(standalone=True) status.register("clock", format="%a, %b %-d %X",) status.register("battery", format="{status} {percentage:.0f}% {remaining:%E%hh:%Mm}", alert=True, alert_percentage=5, color=white, critical_color=red, charging_color=yellow, full_color=white, status={ "DIS": "DIS", "CHR": "CHR", "FULL": "FUL", },)
def __len__(self): return len(self._data.keys()) # Load settings from ``$HOME/.i3/local_settings.json my_settings = MySettings() # Initialize i3pystatus instance status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format=" %Y-%m-%d %H:%M KW%V ", on_leftclick='gsimplecal', ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load", format=" {avg1},{avg5},{avg15},{tasks} ",) # Shows your CPU temperature, if you have a Intel CPU status.register("temp", format="{temp:.0f}°C",) status.register("cpu_usage_graph", ) status.register("mem",
from i3pystatus import Status status = Status() magenta = '#e60053' green = '#28d155' white = '#f2f2f2' orange = '#edbc28' #Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register( "clock", format="%a %-d %b %X", color=white, ) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) #status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register( "temp", format="{temp:.0f}°C", color=white, ) # Show memory usage status.register(
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # Displays whether a DHCP client is running #status.register("runwatch", # name="DHCP", # path="/var/run/dhclient*.pid",) # Shows the address and up/down state of eth0. If it is up the address is shown in # green (the default value of color_up) and the CIDR-address is shown # (i.e. 10.10.10.42/24).
configs["patrick-x240"] = { 'wlan_interface': "wlp3s0", 'ethernet_interface': "enp0s25" } configs["patrick-desktop"] = { 'ethernet_interface': "eth0" } config = configs[socket.gethostname()] status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %T") # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%]
from i3pystatus import Status status = Status(standalone=True) # Shows pulseaudio default sink volume # # Note: requires libpulseaudio from PyPI status.register("pulseaudio",) status.register("backlight", backlight="intel_backlight", format="{percentage}",) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X KW%V",) # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") # Shows your CPU temperature, if you have a Intel CPU status.register("temp", format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m
import color import icons from i3pystatus import Status from rhasspy import Rhasspy from prometheus import Prometheus import yubikey status = Status(standalone=True) ROOT = os.path.dirname(os.path.realpath(__file__)) status.register("network", interface="enp0s20f0u1u4", format_up="{v4cidr} {bytes_sent}/s|{bytes_recv}/s", color_down=color.text_down, color_up=color.text_up, auto_units=True) icons.nerdfont(status, "ﯴ") status.register("disk", path="/", format="{used}/{total}G [{avail}G]", color=color.text_normal) status.register( "mem", format="{used_mem}/{total_mem}MB", color=color.text_normal, warn_color=color.text_warn, )
def register(self, *args, **kwargs): module = Status.register(self, *args, **kwargs) if module: module.on_change = self.run return module
from colored_cpu import CpuUsage from clockv2 import Clock from cond_text import Text from clipboard import Clipboard, Selection from compton import Compton from mpv_music import MpvMusic status = Status(standalone=True) NVIDIA = "#619701" INTEL = "#0860A7" I3BLUE = "#285577" TEMP_OK = "#05A600" LIGHT_YELLOW = "#FFFF80" status.register(Compton, ) status.register( PulseAudio, format="♪{volume:3}{muted}", step=2, #color=I3BLUE, ) status.register( Clock, color=LIGHT_YELLOW, ) status.register( "network",
from i3pystatus import Status status = Status(standalone=True) # Screensaver inhibitor status.register("dpms", format="▒▒", color="#ffffff", color_disabled="#de935f",) # Displays clock like this: # Tue 30 Jul 11:59:46 PM status.register("clock", format=" %a %-d %b %l:%M:%S %p ",) # Battery status.register("battery", format="{status} {remaining} {bar}", color="#b4b7b4", full_color="#b4b7b4", charging_color="#b4b7b4", critical_color="#cc6666", status={'CHR': 'CHR', 'DIS': 'DIS', 'FULL': 'BAT', 'DPL': 'DPL'},) # Network graph & traffic speed # Requires: colour, netifaces, psutil, basiciw status.register("network", interface="wlp3s0", format_up="{interface} @ {essid} [{quality}%]", format_down="{interface}: DOWN", dynamic_color=False,
from i3pystatus import Status from i3pystatus import get_module status = Status() terminal = "alacritty" # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week @get_module def show_date(self): self.output['format'] = '%a %-d %b' status.register("clock", format="%H:%M", on_leftclick=show_date) status.register("text", text="", on_leftclick = "pavucontrol") status.run()
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X", color="#9a875f") # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) # status.register("load") # Shows your CPU temperature, if you have a Intel CPU #status.register("temp", # format="{temp:.0f}°C",) # The battery monitor has many formatting options, see README for # details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] #
from i3pystatus import Status status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %-d %b %X KW%V",) # This would look like this: # Discharging 6h:51m status.register("battery", format="{status} {remaining:%E%hh:%Mm}", alert=True, alert_percentage=5, status={ "DIS": "↓", "CHR": "↑", "FULL": "=", },) # Shows your CPU temperature, if you have a Intel CPU status.register("temp", format="{temp:.0f}°C",) # Note: the network module requires PyPI package netifaces status.register("network", interface="wlp1s0", format_up="{v4cidr}",)
#!/home/k/virtualenvs/i3pystatus/bin/python3 from i3pystatus import Status from i3pystatus.mail import imap import locale import os.path import configparser locale.setlocale(locale.LC_ALL, 'pl_PL') status = Status(standalone=True) # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%a %d.%m %H:%M", interval = 5, on_leftclick = "zenity --calendar") # The battery monitor has many formatting options, see README for details # This would look like this, when discharging (or charging) # ↓14.22W 56.15% [77.81%] 2h:41m # And like this if full: # =14.22W 100.0% [91.21%] # # This would also display a desktop notification (via dbus) if the percentage # goes below 5 percent while discharging. The block will also color RED. status.register("battery", format="{status} [{consumption:.1f}W ]{percentage:.0f}%[ {remaining:%E%hh:%Mm}]", alert=True, alert_percentage=5,
'''i3pystatus config ''' from i3pystatus import Status status = Status(standalone=True) # pylint: disable=invalid-name status.register( "clock", color="#888888", format=('%a %Y-%m-%d <span color="#0099ff">%H:%M:%S</span> Boston', 'America/New_York'), hints={"markup": "pango"}) status.register( "moon", format="{status}", #format='<span font="MoonPhase 8">{status}</span>', status={ # Technically, these symbols are matched up in reverse (e.g., the "full moon" symbol is used for "New Moon") # because this is going to be drawn in a light color on a black background, instead of black on white. 'New Moon': '🌕', 'Waxing Crescent': '🌖', 'First Quarter': '🌗', 'Waxing Gibbous': '🌘', 'Full Moon': '🌑', 'Waning Gibbous': '🌒', 'Last Quarter': '🌓', 'Waning Crescent': '🌔' }, #hints={"separator": False})
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from i3pystatus import Status from i3pystatus.updates import aptget COLAU = "#66AAFF" COLAU2 = "#7799FF" COLHW = "#999999" COLIN = "#FFFFFF" status = Status() status.register("clock", color=COLIN, format="%a %-d %B %Y %T",) status.register("online", hints = {"separator": False, "separator_block_width": 1}, format_online="", color=COLAU, format_offline="", color_offline="#ff0000") status.register("shell", hints = {"separator": False, "separator_block_width": 1}, ignore_empty_stdout=True, color=COLIN, command="i3pystatus-commands wifi", interval=2) status.register("keyboard_locks",
# -*- coding: utf-8 -*- import glob import os import subprocess import color import icons from i3pystatus import Status #from homeassistant import PhoneBattery, BikeBattery, Shannan, WeatherIcon, WeatherText from homeassistant import PhoneBattery, BikeBattery, Shannan, WeatherText status = Status(standalone=True) status.register("clock", format="%a %-d %b %X KW%V", color=color.text_normal) icons.nerdfont(status, "") status.register("pulseaudio", format="{volume}") icons.nerdfont(status, "") status.register( "network", interface="wlan0", format_up="{essid} {quality_bar} {v4cidr} {bytes_sent}/s|{bytes_recv}/s", color_up=color.text_normal, color_down=color.text_down, dynamic_color=False, ) icons.nerdfont(status, "") bat_status = {"DIS": "-", "CHR": "+", "FULL": "↯"}
#!/usr/bin/env python3 from i3pystatus import Status from i3pystatus.mail import maildir import os status = Status() # Displays clock like this: # Tue 30 Jul 11:59:46 PM KW31 # ^-- calendar week status.register("clock", format="%Y-%m-%d %H:%M:%S") # Shows the average load of the last minute and the last 5 minutes # (the default value for format is used) status.register("load") status.register("cpu_usage", format="CPU {usage:3.0f}%") # Shows your CPU temperature, if you have a Intel CPU status.register("temp", alert_temp=70, file="/sys/class/hwmon/hwmon1/temp1_input", format="Core: {temp:.0f}°C",) status.register("temp", alert_temp=70, format="{temp:.0f}°C",)
from i3pystatus import Status from i3pystatus.updates import pacman, yay status = Status() # Notification-center status.register("notification_center", format='{icon}', color="#000000") # Open Rofi power menu status.register("power_menu", color="#000000") # Displays clock status.register("clock", format=" %I:%M", color="#000000") # Displays date status.register("custom_calendar", format=" {date}", interval=600, color="#000000") # XRP # status.register("xrp", # format="XRP {wallet}€ {price}€ {percent}", # color="#000000") # Weather # status.register("custom_weather", format="{weather}", color="#000000") # Weather # status.register("weather_com", format="{icon} {temp}°C", color="#000000") # Updates #status.register("updates",
from i3pystatus import Status import os import netifaces status = Status(standalone=True) def format_label(label, text): return "<span color=\"#FFDD00\">"+label+"</span> "+text status.register("text", text="") status.register("clock", format=format_label("DATE","%a %-d %b %X"), hints={"markup":"pango"}) for interface in ['wlp4s0','enp7s0']: if interface in netifaces.interfaces(): status.register("network", interface=interface, format_up=format_label("NET","{v4}"), format_down="NET DOWN", color_up="#FFFFFF", color_down="#FF0000", hints={"markup":"pango"}) if os.listdir("/sys/class/power_supply/") != []: status.register("battery", format=format_label("BAT","{percentage:.2f}%{status} {remaining:%E%hh:%Mm} {consumption:.2f}W"), alert=True, alert_percentage=5, status={"DIS":"↓", "CHR":"↑", "FULL":"="},
from i3pystatus import Status from i3pystatus.weather import weathercom from i3pystatus import parcel import config status = Status() status.register( "clock", format=" %a %F %T", ) status.register("dpms", format="", format_disabled="", color_disabled="#A52A2A") status.register("pulseaudio", format=" {volume}", multi_colors=True) status.register("load", format="{avg5} {avg1}") status.register("cpu_usage") status.register("temp") status.register("network", interface="enp0s25", format_up=" {bytes_sent} MiB/s {bytes_recv} MiB/s", divisor=1024**2, recv_limit=100000,
# -*- coding: utf-8 -*- import subprocess import os from i3pystatus import Status status = Status(standalone=True) # Clock status.register("clock", format="⌚ %Y-%m-%d %H:%M",) # CPU temperature status.register("temp", file="/sys/class/thermal/thermal_zone1/temp", format="{temp:.0f}°C", interval=3,) # Battery status.register("battery", battery_ident="BAT", format="{percentage_design:.1f} % ({status})", alert=True, alert_percentage=10, status={ "DIS": "↓", "CHR": "↑", "FULL": "=", },)
# -*- coding: utf-8 -*- import subprocess from i3pystatus import Status status = Status(standalone=True) status.register("clock", color="#cccccc", format="%H:%M, %A %-d %B",) status.register("pulseaudio", format="🔊 {volume}",) status.register("load", color="#bbbbbb", critical_limit=8, format="💻 {avg1} / {avg5}") status.register("mem", divisor=10**9, color="#4CAF50", format="{used_mem} / {avail_mem} Gb") status.register("now_playing", player="clementine", color="#ffc080", format='{artist}: "{title}" {song_elapsed}/{song_length}') status.register("network",
base09 = "#f99157" base0A = "#ffcc66" base0B = "#99cc99" base0C = "#66cccc" base0D = "#6699cc" base0E = "#cc99cc" base0F = "#d27b53" ################################### # modules ################################### # clocks status.register("clock", format=" %H:%M:%S", color=base0B, interval=1, on_leftclick="/usr/bin/gsimplecal",) status.register("clock", format=" %a %y%m%d", color=base0B, interval=1,) # weather status.register( 'weather', # format='{condition} {current_temp}{temp_unit}[ {icon}] [ Hi: {high_temp}][ Lo: {low_temp}]', format='{condition} {current_temp}{temp_unit}[ {icon}] [ Hi: {high_temp}][ Lo: {low_temp}]', interval=300, color=base0D,
from i3pystatus import Status status = Status(interval=0.7) status.register( 'clock', format='%b %e %Y %l:%M%p', ) status.register( 'battery', format='{status} {percentage:.0f}%', alert=False, alert_percentage=15, critical_level_percentage=5, status={ 'DIS': '', 'CHR': '⚡', 'FULL': '⚡', }, ) status.register( 'pulseaudio', format='♫ {volume}%', ) status.register( 'cpu_usage', format='CPU {usage}%', )