import subprocess
from subprocess import PIPE
import fcntl
import os
from logging import DEBUG, WARN, INFO

import sh

from pylemonbar import Bar, Align, BarModule, colored, BSPWMDesktops
import pylemonbar

pylemonbar.log.setLevel(INFO)

bar = Bar(font="UbuntuMono Nerd Font Mono:size=18", 
        geometry=(1896, 30, 12, 10),
        bg_color="#D7D787", 
        fg_color="#121212", padding=(20, 20))

bar.register_module(BSPWMDesktops(1))

@bar.module(20, align=Align.RIGHT)
def clock():
    return sh.date("+%a %d %b - %H:%M").strip()

bar.run()


@@ -1,73 +1,4 @@
-import subprocess%0Afrom subprocess import PIPE%0Aimport fcntl%0Aimport os%0A
 from
@@ -81,28 +81,8 @@
 ign,
- BarModule, colored,
  BSP
@@ -91,16 +91,27 @@
 Desktops
+, BarModule
 %0Aimport 
@@ -122,16 +122,17 @@
 monbar%0A%0A
+%0A
 pylemonb
@@ -147,20 +147,20 @@
 etLevel(
-INFO
+WARN
 )%0A%0Abar =
@@ -168,13 +168,79 @@
 Bar(
-font=
+update_interval=0.1,%0A        fonts=%5B%22Font Awesome 5 Free:style=Solid%22, 
 %22Ubu
@@ -272,10 +272,11 @@
 ze=1
-8%22
+2%22%5D
 , %0A 
@@ -335,13 +335,15 @@
 =%22#D
-7D787
+D6a1931
 %22, %0A
@@ -365,72 +365,789 @@
 r=%22#
-121212%22, padding=(20, 20))%0A%0Abar.register_module(BSPWMDesktops(1)
+FFFFFF%22, %0A        padding=(20, 20), %0A        spacing=10,%0A        separator='%E2%94%82')%0A%0Abar.register_module(BSPWMDesktops(1))%0A%0A@bar.module(10, align=Align.RIGHT)%0Adef battery():%0A    try:%0A        battery_level = int(sh.acpi('-b').split()%5B-1%5D%5B:-1%5D)%0A        if battery_level %3C 20:%0A            icon = '%EF%89%84' %0A        elif battery_level %3C 40:%0A            icon = '%EF%89%83' %0A        elif battery_level %3C 60:%0A            icon = '%EF%89%82' %0A        elif battery_level %3C 80:%0A            icon = '%EF%89%81' %0A        else:%0A            icon = '%EF%89%80' %0A%0A        return icon + ' ' + str(battery_level) + '%25'%0A    except ValueError:%0A        return ''%0A%0A%0A@bar.module(60, align=Align.RIGHT)%0Adef fa():%0A    return '%EF%87%AB ' + str(sh.nmcli(%0A        '--terse', '--fields', 'name', '--colors=no', 'connection', 'show', '--active')%0A        ).strip(
 )%0A%0A@

Add module